nitc :: ACharExpr :: defaultinit
nitc :: ACharExpr :: init_acharexpr
nitc :: ACharExpr :: is_code_point
Is the expression returning a Code Point ?nitc :: literal $ ACharExpr :: accept_literal
nitc :: rapid_type_analysis $ ACharExpr :: accept_rapid_type_visitor
nitc :: typing $ ACharExpr :: accept_typing
nitc :: literal $ ACharExpr :: delimiter_end
nitc :: literal $ ACharExpr :: delimiter_start
nitc :: test_astbuilder $ ACharExpr :: do_cloneable
nitc :: java_compiler $ ACharExpr :: expr
Try to compile self as an expressionnitc :: abstract_compiler $ ACharExpr :: expr
Try to compile self as an expressionnitc :: naive_interpreter $ ACharExpr :: expr
Evaluate the node as a possible expression.nitc :: literal $ ACharExpr :: is_valid_augmentation
Is the combination of prefixes and suffixes inself
valid ?
nitc :: parser_prod $ ACharExpr :: n_annotations=
All the annotations attached directly to the nodenitc :: parser_prod $ ACharExpr :: replace_child
Replace a child with an other node in the ASTnitc :: AExpr :: _after_flow_context
The flow after the full evaluation of the expression/statementnitc :: AExpr :: _comprehension
Is non-null ifself
is a leaf of a comprehension array construction.
nitc :: AAugmentedLiteral :: _content
Content of the entity, without prefix nor suffixnitc :: Prod :: _first_location
Location on the first token after the start of a productionnitc :: Prod :: _first_token
The first token of the production in the ASTnitc :: AExpr :: _implicit_cast_to
If required, the following implicit cast.as(XXX)
nitc :: ANode :: _is_broken
The indication that the node did not pass some semantic verifications.nitc :: Prod :: _last_token
The last token of the production in the ASTnitc :: Prod :: _n_annotations
All the annotations attached directly to the nodenitc :: AAugmentedLiteral :: _prefix
Prefix for the entity, "" if no prefix is foundnitc :: AAugmentedLiteral :: _suffix
Suffix for the entity, "" if no prefix is foundnitc :: AExpr :: _vararg_decl
It indicates the number of arguments collected as a vararg.nitc :: AExpr :: _variable_cache
nitc :: ANode :: accept_ast_validation
nitc :: ANode :: accept_auto_super_init
nitc :: AExpr :: accept_explain_assert
Fillv
to explain this node if the parent assert fails
nitc :: ANode :: accept_flow_visitor
nitc :: ANode :: accept_forward_analysis
Apply the forward analysisv
to self
.
nitc :: ANode :: accept_literal
nitc :: ANode :: accept_post_typing
nitc :: ANode :: accept_pretty_printer
Start visit ofself
using a PrettyPrinterVisitor
nitc :: ANode :: accept_reaching_defs
Apply a ReachingDefsAnalysis toself
.
nitc :: ANode :: accept_regex_visitor
nitc :: ANode :: accept_scope_visitor
nitc :: ANode :: accept_simple_misc
nitc :: ANode :: accept_string_finder
nitc :: AExpr :: accept_typing
nitc :: AExpr :: after_flow_context
The flow after the full evaluation of the expression/statementnitc :: AExpr :: after_flow_context=
The flow after the full evaluation of the expression/statementnitc :: ANode :: after_simple_misc
nitc :: AExpr :: allocate_mtype
Make themtype
of the expression live
nitc :: ANode :: bad_expr_message
An additional information message to explain the role of a child expression.nitc :: ANode :: check_callsite
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: ANode :: collect_annotations_by_name
Do a deep search and return an array of node that are annotatednitc :: Prod :: collect_comments
Collect allTComment
contained in the production
nitc :: ANode :: collect_length
Collect the length (inChar
) of the node.
nitc :: ANode :: collect_tokens_by_text
Do a deep search and return an array of tokens that match a given textnitc :: ANode :: common_parent
The most specific common parent betweenself
and other
nitc :: AExpr :: comprehension
Is non-null ifself
is a leaf of a comprehension array construction.
nitc :: AExpr :: comprehension=
Is non-null ifself
is a leaf of a comprehension array construction.
nitc :: AAugmentedLiteral :: content
Content of the entity, without prefix nor suffixnitc :: AAugmentedLiteral :: content=
Content of the entity, without prefix nor suffixnitc :: ANode :: create_contracts
nitc :: ANode :: decorate_tag
Add aditionnal information on a child-token and return an additionnal HInfoBox on itnitc :: AExpr :: defaultinit
nitc :: ACharExpr :: defaultinit
core :: Object :: defaultinit
nitc :: AAugmentedLiteral :: defaultinit
nitc :: Prod :: defaultinit
nitc :: ANode :: defaultinit
core :: Cloneable :: defaultinit
nitc :: AExpr :: detach_with_placeholder
Thedetach
method completely remove the node in the parent.
nitc :: ANode :: do_cloneable
nitc :: Prod :: first_location
Location on the first token after the start of a productionnitc :: Prod :: first_location=
Location on the first token after the start of a productionnitc :: Prod :: first_token
The first token of the production in the ASTnitc :: Prod :: first_token=
The first token of the production in the ASTnitc :: ANode :: force_block=
Forceself
to be rendered as a block.
nitc :: ANode :: force_inline=
Forceself
to be rendered as a line.
nitc :: ANode :: full_transform_visitor
nitc :: AExpr :: generate_basic_blocks
Generate recursively basic block for this expressionnitc :: Prod :: get_annotations
Return all its annotations of a given name in the order of their declarationnitc :: Prod :: get_single_annotation
Try to get its single annotation with a given namenitc :: ANode :: hot_location
The location of the important part of the node (identifier or whatever)nitc :: AExpr :: implicit_cast_to
If required, the following implicit cast.as(XXX)
nitc :: AExpr :: implicit_cast_to=
If required, the following implicit cast.as(XXX)
nitc :: ACharExpr :: init_acharexpr
nitc :: ANode :: is_broken=
The indication that the node did not pass some semantic verifications.nitc :: ACharExpr :: is_code_point
Is the expression returning a Code Point ?nitc :: ANode :: is_noserialize
Is this node annotated to not be made serializable?core :: 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.
nitc :: ANode :: is_serialize
Is this node annotated to be made serializable?nitc :: ANode :: is_structural
Isself
a token or a pure-structural production like AQId
?
nitc :: AAugmentedLiteral :: is_valid_augmentation
Is the combination of prefixes and suffixes inself
valid ?
nitc :: Prod :: last_token
The last token of the production in the ASTnitc :: Prod :: last_token=
The last token of the production in the ASTnitc :: AExpr :: make_var_read
Return a new variable read that contains the value of the expressionnitc :: ANode :: must_be_block
Doesself
have to be rendered as a block?
nitc :: ANode :: must_be_inline
Doesself
have be rendered as a line?
nitc :: Prod :: n_annotations
All the annotations attached directly to the nodenitc :: Prod :: n_annotations=
All the annotations attached directly to the nodecore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: ANode :: parentize_tokens
Visit the AST and computes advanced AST attributes on Tokens and Prodnitc :: AAugmentedLiteral :: prefix
Prefix for the entity, "" if no prefix is foundnitc :: AAugmentedLiteral :: prefix=
Prefix for the entity, "" if no prefix is foundnitc :: ANode :: replace_child
Replace a child with an other node in the ASTnitc :: ANode :: replace_with
Replace itself with an other node in the ASTnitc :: Prod :: start_token
The token where the production really start (skipping ADoc).nitc :: AAugmentedLiteral :: suffix
Suffix for the entity, "" if no prefix is foundnitc :: AAugmentedLiteral :: suffix=
Suffix for the entity, "" if no prefix is foundnitc :: AExpr :: vararg_decl
It indicates the number of arguments collected as a vararg.nitc :: AExpr :: vararg_decl=
It indicates the number of arguments collected as a vararg.nitc :: AExpr :: variable_cache
nitc :: AExpr :: variable_cache=
nitc :: AExpr :: warn_parentheses
Warn in case of superfluous parenthesesnitc :: ANode :: was_inline
Doesself
was written in one line before transformation?
redef class ACharExpr
init init_acharexpr (
n_char: nullable TChar,
n_annotations: nullable AAnnotations
)
do
_n_char = n_char.as(not null)
n_char.parent = self
_n_annotations = n_annotations
if n_annotations != null then n_annotations.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
if _n_char == old_child then
n_char = new_child.as(TChar)
return
end
if _n_annotations == old_child then
n_annotations = new_child.as(nullable AAnnotations)
return
end
end
redef fun n_char=(node)
do
_n_char = node
node.parent = self
end
redef fun n_annotations=(node)
do
_n_annotations = node
if node != null then node.parent = self
end
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_char)
v.enter_visit(_n_annotations)
end
end
src/parser/parser_prod.nit:6675,1--6716,3
redef class ACharExpr
super AAugmentedLiteral
# The value of the literal char once computed.
var value: nullable Char = null
redef fun delimiter_start do return '\''
redef fun delimiter_end do return '\''
# Is the expression returning a Code Point ?
fun is_code_point: Bool do return prefix == "u"
redef fun text do return n_char.text
redef fun is_valid_augmentation do
if suffix != "" then return false
if is_code_point then return true
if prefix != "" then return false
return true
end
redef fun accept_literal(v)
do
if not is_valid_augmentation then
v.toolcontext.error(hot_location, "Syntax Error: invalid prefix/suffix combination {prefix}/{suffix}")
return
end
var txt = content.unescape_nit
if txt.length != 3 then
v.toolcontext.error(self.hot_location, "Syntax Error: invalid character literal `{txt}`.")
return
end
self.value = txt.chars[1]
end
end
src/literal.nit:123,1--157,3
redef class ACharExpr
redef fun accept_typing(v) do
var mclass: nullable MClass = null
if is_code_point then
mclass = v.get_mclass(self, "Int")
else
mclass = v.get_mclass(self, "Char")
end
if mclass == null then return # Forward error
self.mtype = mclass.mclass_type
end
end
src/semantize/typing.nit:1625,1--1636,3
redef class ACharExpr
# `token_text` represent the real value as it's present in a file not only the char.
# `token_text` is needed if you want to use some methods (for exemple: `prefix`, `suffix` or `is_code_point methods`)
private init make(value: nullable Char, t: nullable MType, token_text: nullable String)
do
_value = value
_mtype = t
_n_char = new TChar
if token_text != null then n_char.text = token_text
if t != null then self.is_typed = true
end
redef fun clone: SELF
do
var self_clone = new ACharExpr.make(self.value, mtype, n_char.text)
return self_clone
end
end
src/astbuilder.nit:580,1--598,3
redef class ACharExpr
redef fun accept_rapid_type_visitor(v)
do
allocate_mtype(v)
end
end
src/rapid_type_analysis.nit:569,1--574,3
redef class ACharExpr
redef fun do_cloneable(v)
do
replace_clone
end
end
src/test_astbuilder.nit:113,1--118,3