nitc :: AStringFormExpr :: _bytes
The underlying bytes of the String, non-cleaned for UTF-8nitc :: AStringFormExpr :: _raw_text
Returns the raw text read by the lexernitc :: AStringFormExpr :: _value
The value of the literal string once computed.nitc :: AStringFormExpr :: bytes
The underlying bytes of the String, non-cleaned for UTF-8nitc :: AStringFormExpr :: bytes=
The underlying bytes of the String, non-cleaned for UTF-8nitc :: AStringFormExpr :: defaultinit
nitc :: AStringFormExpr :: raw_text=
Returns the raw text read by the lexernitc :: AStringFormExpr :: value=
The value of the literal string once computed.nitc $ AStringFormExpr :: SELF
Type of this instance, automatically specialized in every classnitc :: literal $ AStringFormExpr :: accept_literal
nitc :: pretty $ AStringFormExpr :: accept_pretty_printer
Start visit ofself
using a PrettyPrinterVisitor
nitc :: rapid_type_analysis $ AStringFormExpr :: accept_rapid_type_visitor
nitc :: htmlight $ AStringFormExpr :: decorate_tag
Add aditionnal information on a child-token and return an additionnal HInfoBox on itnitc :: naive_interpreter $ AStringFormExpr :: expr
Evaluate the node as a possible expression.nitc :: abstract_compiler $ AStringFormExpr :: expr
Try to compile self as an expressionnitc :: AExpr :: _after_flow_context
The flow after the full evaluation of the expression/statementnitc :: AStringFormExpr :: _bytes
The underlying bytes of the String, non-cleaned for UTF-8nitc :: 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 :: AugmentedStringFormExpr :: _extended
Regex::extended, used for suffixb
on re
nitc :: 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 :: AugmentedStringFormExpr :: _ignore_case
Regex::ignore_case, used for suffixi
on re
nitc :: 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 :: AugmentedStringFormExpr :: _newline
Regex::newline, used for suffixm
on re
nitc :: AAugmentedLiteral :: _prefix
Prefix for the entity, "" if no prefix is foundnitc :: AStringFormExpr :: _raw_text
Returns the raw text read by the lexernitc :: AAugmentedLiteral :: _suffix
Suffix for the entity, "" if no prefix is foundnitc :: AugmentedStringFormExpr :: _to_bytes_with_copy
CString::to_bytes_with_copy, used for prefixb
nitc :: AugmentedStringFormExpr :: _to_re
Text::to_re, used for prefixre
nitc :: AStringFormExpr :: _value
The value of the literal string once computed.nitc :: 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 :: AStringFormExpr :: bytes
The underlying bytes of the String, non-cleaned for UTF-8nitc :: AStringFormExpr :: bytes=
The underlying bytes of the String, non-cleaned for UTF-8nitc :: 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 :: AStringFormExpr :: defaultinit
nitc :: AExpr :: defaultinit
core :: Object :: defaultinit
nitc :: AAugmentedLiteral :: defaultinit
nitc :: ANode :: defaultinit
nitc :: Prod :: defaultinit
core :: Cloneable :: defaultinit
nitc :: AExpr :: detach_with_placeholder
Thedetach
method completely remove the node in the parent.
nitc :: ANode :: do_cloneable
nitc :: AugmentedStringFormExpr :: extended
Regex::extended, used for suffixb
on re
nitc :: AugmentedStringFormExpr :: extended=
Regex::extended, used for suffixb
on re
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 :: AugmentedStringFormExpr :: ignore_case
Regex::ignore_case, used for suffixi
on re
nitc :: AugmentedStringFormExpr :: ignore_case=
Regex::ignore_case, used for suffixi
on re
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 :: ANode :: is_broken=
The indication that the node did not pass some semantic verifications.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 :: AugmentedStringFormExpr :: make_re
Factorize the making of aRegex
object from a literal prefixed string
nitc :: AugmentedStringFormExpr :: make_re
Factorize the making of aRegex
object from a literal prefixed string
nitc :: 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.nitc :: AugmentedStringFormExpr :: newline
Regex::newline, used for suffixm
on re
nitc :: AugmentedStringFormExpr :: newline=
Regex::newline, used for suffixm
on re
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 :: AStringFormExpr :: raw_text=
Returns the raw text read by the lexernitc :: 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 :: AugmentedStringFormExpr :: to_bytes_with_copy
CString::to_bytes_with_copy, used for prefixb
nitc :: AugmentedStringFormExpr :: to_bytes_with_copy=
CString::to_bytes_with_copy, used for prefixb
nitc :: AugmentedStringFormExpr :: to_re
Text::to_re, used for prefixre
nitc :: AugmentedStringFormExpr :: to_re=
Text::to_re, used for prefixre
nitc :: AStringFormExpr :: value=
The value of the literal string once computed.nitc :: 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?
nitc :: AugmentedStringFormExpr
Any kind of string form with augmentations from prefixes or suffixes
# A string literal
abstract class AStringFormExpr
super AExpr
# The string token
var n_string: Token is writable, noinit
end
src/parser/parser_nodes.nit:2673,1--2679,3
redef class AStringFormExpr
super AugmentedStringFormExpr
# The value of the literal string once computed.
var value: String is noinit
# The underlying bytes of the String, non-cleaned for UTF-8
var bytes: Bytes is noinit
redef fun text do return n_string.text
# Returns the raw text read by the lexer
var raw_text: String is lazy do
var txt = content
var behead = 1
var betail = 1
if txt.chars[0] == txt.chars[1] and txt.length >= 6 then
behead = 3
betail = 3
if txt.chars[0] == delimiter_start and txt.chars[3] == '\n' then behead = 4 # ignore first \n in """
end
return txt.substring(behead, txt.length - behead - betail)
end
redef fun accept_literal(v) do
value = raw_text
bytes = raw_text.to_bytes
end
end
src/literal.nit:193,1--221,3
redef class AStringFormExpr
redef fun accept_pretty_printer(v) do
if not v.break_strings then
# n_string.force_inline = true
v.visit n_string
return
end
if v.can_inline(self) then
n_string.force_inline = true
v.visit n_string
else
var text = n_string.text
var i = 0
while i < text.length do
v.add text[i].to_s
if v.max_size > 0 and v.current_length >= v.max_size and i <= text.length - 3 then
v.add "\" +"
if was_inline then
v.forcen
else
v.addn
end
v.indent += 1
v.addt
v.indent -= 1
v.add "\""
end
i += 1
end
v.current_token = n_string.next_token
end
end
end
src/pretty.nit:2113,1--2149,3
redef class AStringFormExpr
redef fun accept_rapid_type_visitor(v)
do
var native = v.analysis.mainmodule.c_string_type
v.add_type(native)
var prop = v.get_method(native, "to_s_unsafe")
v.add_monomorphic_send(native, prop)
v.add_callsite(to_re)
v.add_callsite(ignore_case)
v.add_callsite(newline)
v.add_callsite(extended)
v.add_callsite(to_bytes_with_copy)
end
end
src/rapid_type_analysis.nit:591,1--604,3
redef class AStringFormExpr
redef fun expr(v) do return v.string_instance(value)
end
src/interpreter/naive_interpreter.nit:2122,1--2124,3
redef class AStringFormExpr
redef fun expr(v) do return v.string_instance(value)
end
src/compiler/abstract_compiler.nit:4188,1--4190,3