nitcc_runtime $ NToken :: SELF
Type of this instance, automatically specialized in every classnitcc_runtime $ NToken :: children
A point of view on the direct children of the nodenitcc_runtime :: Node :: children
A point of view on the direct children of the nodecore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
nitcc_runtime :: NToken :: defaultinit
nitcc_runtime :: Node :: defaultinit
nitcc_runtime :: Node :: depth
A point of view of a depth-first visit of all non-null childrennitcc_runtime :: Node :: depth=
A point of view of a depth-first visit of all non-null childrencore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitcc_runtime :: Node :: node_name
The name of the node (as used in the grammar file)core :: Object :: output_class_name
Display class name on stdout (debug only).nitcc_runtime :: Node :: position
The position of the node in the input streamnitcc_runtime :: Node :: position=
The position of the node in the input streamnitcc_runtime :: Node :: to_dot
Produce a graphiz file for the syntaxtic tree rooted atself
.
nitcc_runtime :: Node :: visit_children
Visit all the children of the node with the visitorv
# 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