Is self printable in one line?

Property definitions

nitc :: pretty $ ANode :: is_inlinable
	# Is `self` printable in one line?
	private fun is_inlinable: Bool do return true
src/pretty.nit:326,2--327,46

nitc :: pretty $ Token :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:355,2--38

nitc :: pretty $ AModule :: is_inlinable
	redef fun is_inlinable do return false
src/pretty.nit:600,2--39

nitc :: pretty $ AExternCodeBlock :: is_inlinable
	redef fun is_inlinable do
		if not super then return false
		return n_extern_code_segment.is_inlinable
	end
src/pretty.nit:1136,2--1139,4

nitc :: pretty $ ADoc :: is_inlinable
	redef fun is_inlinable do return n_comment.length <= 1
src/pretty.nit:488,2--55

nitc :: pretty $ AAnnotations :: is_inlinable
	redef fun is_inlinable do
		if not super then return false
		for annot in n_items do if not annot.is_inlinable then return false
		return true
	end
src/pretty.nit:528,2--532,4

nitc :: pretty $ TExternCodeSegment :: is_inlinable
	redef fun is_inlinable do
		if not super then return false
		return location.line_start == location.line_end
	end
src/pretty.nit:1186,2--1189,4

nitc :: pretty $ ABlockExpr :: is_inlinable
	redef fun is_inlinable do
		if not super then return false
		if not collect_comments.is_empty then return false

		if not n_expr.is_empty then
			if n_expr.length > 1 then return false
			if not n_expr.first.is_inlinable then return false
		end

		return true
	end
src/pretty.nit:1218,2--1228,4

nitc :: pretty $ AVardeclExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1815,2--38

nitc :: pretty $ AAbortExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1924,2--38

nitc :: pretty $ AIfExpr :: is_inlinable
	redef fun is_inlinable do
		if not super then return false
		if n_then != null and not n_then.is_inlinable then return false
		var n_else = self.n_else
		if (n_else isa ABlockExpr and not n_else.n_expr.is_empty) or
		   (not n_else isa ABlockExpr and n_else != null) then
			return false
		end
		if not collect_comments.is_empty then return false
		return true
	end
src/pretty.nit:1353,2--1363,4

nitc :: pretty $ AAssertExpr :: is_inlinable
	redef fun is_inlinable do
		if not super then return false
		if n_else != null and not n_else.is_inlinable then return false
		return true
	end
src/pretty.nit:1872,2--1876,4

nitc :: pretty $ ANullExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:2067,2--38

nitc :: pretty $ AOnceExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1919,2--38

nitc :: pretty $ ASendExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1587,2--38

nitc :: pretty $ ASuperExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1909,2--38

nitc :: pretty $ ANewExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1757,2--38

nitc $ ALoopHelper :: is_inlinable
	redef fun is_inlinable do
		var n_block = loop_block
		if not super then return false
		if n_block isa ABlockExpr and not n_block.is_inlinable then return false
		if not collect_comments.is_empty then return false
		return true
	end
src/pretty.nit:1459,2--1465,4

nitc :: pretty $ AAttrPropdef :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:940,2--38

nitc :: pretty $ AAttrExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1768,2--38

nitc :: pretty $ AStdClassdef :: is_inlinable
	redef fun is_inlinable do
		if not super then return false
		# FIXME: repair pretty-printing one-liner classes
		if n_propdefs.length > 0 then return false
		#if n_propdefs.length == 1 and not n_propdefs.first isa ASuperPropdef then return false
		if not collect_comments.is_empty then return false
		return true
	end
src/pretty.nit:738,2--745,4

nitc :: pretty $ ATypePropdef :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:957,2--38

nitc :: pretty $ ASuperPropdef :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1022,2--38

nitc :: pretty $ AMethPropdef :: is_inlinable
	# Can be inlined if:
	# * block is empty or can be inlined
	# * contains no comments
	redef fun is_inlinable do
		if not super then return false
		if n_annotations != null and not n_annotations.is_inlinable then return false
		if n_block != null and not n_block.is_inlinable then return false
		if n_extern_calls != null and not n_extern_calls.is_inlinable then return false
		if n_extern_code_block != null and not n_extern_code_block.is_inlinable then return false
		if not collect_comments.is_empty then return false
		return true
	end
src/pretty.nit:990,2--1001,4

nitc :: pretty $ AOrElseExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:2053,2--38

nitc :: pretty $ ABreakExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1563,2--38

nitc :: pretty $ AContinueExpr :: is_inlinable
	redef fun is_inlinable do return true
src/pretty.nit:1581,2--38