Property definitions

nitcc_runtime $ NToken :: defaultinit
# A token produced by the lexer and used in a syntactic tree
abstract class NToken
	super Node

	redef fun children do return once new Array[Node]

	redef fun to_dot_visitor(f, a)
	do
		var labe = "{node_name}"
		var pos = position
		if pos != null then labe += "\\n{pos}"
		var text = self.text
		if node_name != "'{text}'" then
			labe += "\\n'{text.escape_to_c}'"
		end
		f.write("n{object_id} [label=\"{labe}\",shape=box];\n")
		a.add(self)
	end

	# The text associated with the token
	var text: String = "" is writable

	redef fun to_s do
		var res = super
		var text = self.text
		if node_name != "'{text}'" then
			res += "='{text.escape_to_c}'"
		end
		return res
	end
end
lib/nitcc_runtime/nitcc_runtime.nit:463,1--493,3