Optional
indentation: string | numberReadonly
contentsOptional
indentationOptional
tracedAppends strings
and instances of GeneratorNode to this
generator node.
Rest
...content: (Generated | ((node: this) => void))[]a var arg mixture of strings
, GeneratorNodes, or single param
functions that are immediately called with this
node as argument, and which may append elements themselves.
this
CompositeGeneratorNode for convenience.
Appends strings
and instances of GeneratorNode to this
generator node, if condition
is equal to true
.
If condition
is satisfied this method delegates to append, otherwise it returns just this
.
a boolean value indicating whether to append the elements of args
to this
.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]a var arg mixture of strings
, GeneratorNodes, or single param
functions that are immediately called with this
node as argument, and which may append elements themselves.
this
CompositeGeneratorNode for convenience.
Appends a strict NewLineNode to this
node.
Strict NewLineNodes yield mandatory linebreaks in the derived generated text.
this
CompositeGeneratorNode for convenience.
Appends a strict NewLineNode to this
node, if condition
is equal to true
.
Strict NewLineNodes yield mandatory linebreaks in the derived generated text.
a boolean value indicating whether to append a NewLineNode to this
.
this
CompositeGeneratorNode for convenience.
Appends a soft NewLineNode to this
node.
Soft NewLineNodes yield linebreaks in the derived generated text only if the preceding line is non-empty,
i.e. there are non-whitespace characters added to the generated text since the last linebreak.
this
CompositeGeneratorNode for convenience.
Appends a soft NewLineNode to this
node, if condition
is equal to true
.
Soft NewLineNodes yield linebreaks in the derived generated text only if the preceding line is non-empty,
i.e. there are non-whitespace characters added to the generated text since the last linebreak.
a boolean value indicating whether to append a NewLineNode to this
.
this
CompositeGeneratorNode for convenience.
Convenience method for appending content in form of a template to this
generation node.
See expandToNode for details.
Rest
...substitutions: unknown[]this
CompositeGeneratorNode for convenience.
Convenience method for appending content in form of a template to this
generator node, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the tagged template delegates to appendTemplate, otherwise it returns just this
.
See expandToNode for details.
a boolean value indicating whether to append the template content to this
.
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Convenience method for appending content to this
generator node including tracing information
in form of {astNode, property?, index: undefined}
.
This method returns a helper function that takes the desired content
and does the processing.
The returned function delegates to append, with the provided content
being
wrapped by an additional CompositeGeneratorNode configured with the tracing information.
the AstNode corresponding to the appended content
Optional
property: Properties<T>the value property name (string) corresponding to the appended content,
if e.g. the content corresponds to some string
or number
property of astNode
, is optional
a function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]Convenience method for appending content to this
generator node including tracing information
in form of {astNode, property, index}
.
This method returns a helper function that takes the desired content
and does the processing.
The returned function delegates to append, with the provided content
being
wrapped by an additional CompositeGeneratorNode configured with the tracing information.
the AstNode corresponding to the appended content
the value property name (string) corresponding to the appended content,
if e.g. the content corresponds to some string
or number
property of astNode
the index of the value within a list property corresponding to the appended content, if the property contains a list of elements, is ignored otherwise
a function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]Convenience method for appending content to this
generator node including tracing information
in form of concrete coordinates.
This method returns a helper function that takes the desired content
and does the processing.
The returned function delegates to append, with the provided content
being
wrapped by an additional CompositeGeneratorNode configured with the tracing information.
a text region within some file in form of concrete coordinates,
if undefined
no tracing will happen
a function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]Convenience method for appending content to this
generator node including tracing information
in form of a list of concrete coordinates.
This method returns a helper function that takes the desired content
and does the processing.
The returned function delegates to append, with the provided content
being
wrapped by an additional CompositeGeneratorNode configured with the tracing information.
The list of regions in sourceRegions
will later be reduced to the smallest encompassing region
of all the contained source regions.
a list of text regions within some file in form of concrete coordinates, if empty no tracing will happen
a function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]Convenience method for appending content to this
generator node including tracing information
in form of {astNode, property?, index: undefined}
, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the returned function delegates to appendTraced, otherwise it returns just this
.
a boolean value indicating whether to append the template content to this
.
the AstNode corresponding to the appended content
Optional
property: Properties<T>the value property name (string) corresponding to the appended content,
if e.g. the content corresponds to some string
or number
property of astNode
, is optional
a function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]Convenience method for appending content to this
generator node including tracing information
in form of {astNode, property, index}
, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the returned function delegates to appendTraced, otherwise it returns just this
.
a boolean value indicating whether to append the template content to this
.
the AstNode corresponding to the appended content
the value property name (string) corresponding to the appended content,
if e.g. the content corresponds to some string
or number
property of astNode
the index of the value within a list property corresponding to the appended content, if the property contains a list of elements, is ignored otherwise
a function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]Convenience method for appending content to this
generator node including tracing information
in form of concrete coordinates, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the returned function delegates to appendTraced, otherwise it returns just this
.
If sourceRegion
is a function supplying the corresponding region, it's only called if condition
is satisfied.
a boolean value indicating whether to append the template content to this
.
a text region within some file in form of concrete coordinates,
if undefined
no tracing will happen
a function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]Convenience method for appending content to this
generator node including tracing information
in form of a list of concrete coordinates, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the returned function delegates to appendTraced, otherwise it returns just this
.
The list of regions in sourceRegions
will later be reduced to the smallest encompassing region
of all the contained source regions.
If sourceRegions
is a function supplying the corresponding regions, it's only called if condition
is satisfied.
a boolean value indicating whether to append the template content to this
.
a list of text regions within some file in form of concrete coordinates, if empty no tracing will happen
a function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...content: (Generated | ((node: CompositeGeneratorNode) => void))[]Convenience method for appending content in form of a template to this
generator node including tracing
information in form of {astNode, property?, index: undefined}
.
This method returns a tag function that takes the desired template and does the processing by delegating to expandTracedToNode.
the AstNode corresponding to the appended content
Optional
property: Properties<T>the value property name (string) corresponding to the appended content,
if e.g. the content corresponds to some string
or number
property of astNode
, is optional
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Convenience method for appending content in form of a template to this
generator node including tracing
information in form of {astNode, property, index}
.
This method returns a tag function that takes the desired template and does the processing by delegating to expandTracedToNode.
the AstNode corresponding to the appended content
the value property name (string) corresponding to the appended content,
if e.g. the content corresponds to some string
or number
property of astNode
the index of the value within a list property corresponding to the appended content, if the property contains a list of elements, is ignored otherwise, is optinal
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Convenience method for appending content in form of a template to this
generator node including tracing
information in form of concrete coordinates.
This method returns a tag function that takes the desired template and does the processing by delegating to expandTracedToNode.
a text region within some file in form of concrete coordinates,
if undefined
no tracing will happen
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Convenience method for appending content in form of a template to this
generator node including tracing
information in form of concrete coordinates.
This method returns a tag function that takes the desired template and does the processing by delegating to expandTracedToNode.
The list of regions in sourceRegions
will later be reduced to the smallest encompassing region
of all the contained source regions.
a list of text regions within some file in form of concrete coordinates, if empty no tracing will happen
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Convenience method for appending content in form of a template to this
generator node including tracing information
in form of {astNode, property?, index: undefined}
, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the tagged template delegates to appendTracedTemplate, otherwise it returns just this
.
See also expandTracedToNode for details.
a boolean value indicating whether to append the template content to this
.
the AstNode corresponding to the appended content
Optional
property: Properties<T>the value property name (string) corresponding to the appended content,
if e.g. the content corresponds to some string
or number
property of astNode
, is optional
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Convenience method for appending content in form of a template to this
generator node including tracing information
in form of {astNode, property, index}
, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the tagged template delegates to appendTracedTemplate, otherwise it returns just this
.
See also expandTracedToNode for details.
a boolean value indicating whether to append the template content to this
.
the AstNode corresponding to the appended content
the value property name (string) corresponding to the appended content,
if e.g. the content corresponds to some string
or number
property of astNode
the index of the value within a list property corresponding to the appended content, if the property contains a list of elements, is ignored otherwise
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Convenience method for appending content in form of a template to this
generator node including tracing information
in form of concrete coordinates, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the tagged template delegates to appendTracedTemplate, otherwise it returns just this
.
See also expandTracedToNode for details.
sourceRegion
is a function supplying the corresponding region, it's only called if condition
is satisfied.a boolean value indicating whether to append the template content to this
.
a text region within some file in form of concrete coordinates,
if undefined
no tracing will happen
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Convenience method for appending content in form of a template to this
generator node including tracing information
in form of a list of concrete coordinates, if condition
is equal to true
.
This method returns a tag function that takes the desired template and does the processing.
If condition
is satisfied the tagged template delegates to appendTracedTemplate, otherwise it returns just this
.
See also expandTracedToNode for details.
The list of regions in sourceRegions
will later be reduced to the smallest encompassing region
of all the contained source regions.
If sourceRegions
is a function supplying the corresponding regions, it's only called if condition
is satisfied.
a boolean value indicating whether to append the template content to this
.
a list of text regions within some file in form of concrete coordinates, if empty no tracing will happen
a tag function behaving as described above, which in turn returns this
CompositeGeneratorNode for convenience.
Rest
...substitutions: unknown[]Adds an area of indented text output.
The content to be indented can be provided as an array consisting of strings and/or generation nodes
(undefined is permitted), or via a callback offering the indentingNode
to which the content shall be appended.
Alternatively, an object satisfying IndentConfig can be provided taking the children as Array or via
a callback as described previously via the indentedChildren
property.
The remaining properties of IndentConfig have the following effects:
indentation
: a specific indentation length or string, defaults to the global indentation setting if omitted, see toString,indentEmptyLines
: apply indentation to empty lines, defaults to false
indentImmediately
: apply the indentation immediately starting at the first line, defaults to true
, might be set to false
if preceding content is not terminated by any newline
. If false
the indentation is inserted only after child newline
nodes
followed by further content.Optional
childrenOrConfig: Generated[] | ((indented: IndentNode) => void) | IndentConfigan Array or callback contributing the children, or a config object satisfying IndentConfig alternatively.
this
CompositeGeneratorNode for convenience.
Adds tracing information in form of {astNode, property?, index: undefined}
to this
generator node.
Overwrites existing trace data, if set previously.
The given data are kept as they are, the actual resolution of text positions within the DSL text
is done at the final processing of this
node as part of ().
the AstNode corresponding to this
node's content
Optional
property: Properties<T>the value property name (string) corresponding to this
node's content,
e.g. if this node's content corresponds to some string
or number
property; is optional
this
CompositeGeneratorNode for convenience.
Adds tracing information in form of {astNode, property, index}
to this
generator node.
Overwrites existing trace data, if set previously.
The given data are kept as they are, the actual resolution of text positions within the DSL text
is done at the final processing of this
node as part of ().
the AstNode corresponding to this
node's content
the value property name (string) corresponding to this
node's content,
e.g. if this node's content corresponds to some string
or number
property
the index of the value within a list property corresponding to this
node's content,
if the property contains a list of elements, is ignored otherwise
this
CompositeGeneratorNode for convenience.
Adds tracing information in form of concrete coordinates to this
generator node. Complete coordinates
are provided by the AstNodes' corresponding AstNode.$cstNodes.
Overwrites existing trace data, if set previously.
a text region within some file in form of concrete coordinates,
if undefined
no tracing will happen
this
CompositeGeneratorNode for convenience.
Adds tracing information in form of a list of concrete coordinates to this
generator node.
Overwrites existing trace data, if set previously.
The list of regions in sourceRegion
is reduced to the smallest encompassing region
of all the contained source regions.
a list of text regions within some file in form of concrete coordinates, if empty no tracing will happen
this
CompositeGeneratorNode for convenience.
Implementation of @{link GeneratorNode} denoting areas within the desired generated text of common increased indentation.