NStringLiteral
Represents a string literal in the AST, supporting interpolation and tags.
Instance Members
parts: Array<NStringPart>Array of parts that make up this string literal.
quotes: QuotesThe type of quotes used for this string literal
type(): String| Returns |
|---|
| String |
each(handleNode: Function): Void| Name | Type |
|---|---|
handleNode |
Function |
toJson(): DynamicConverts the string literal to a JSON representation.
| Returns | Description |
|---|---|
| Dynamic | Dynamic object containing string data and its parts |
new(id: NodeId, pos: Position, quotes: Quotes, parts: Array<NStringPart>, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): VoidCreates a new string literal node.
| Name | Type | Default | Description |
|---|---|---|---|
id |
NodeId | ||
pos |
Position | Position in source where this string appears | |
quotes |
Quotes | ||
parts |
Array<NStringPart> | Array of string parts (raw text, interpolations, and tags) | |
leadingComments |
Array<Comment> | (optional) | Optional comments before the string |
trailingComments |
Array<Comment> | (optional) | Optional comments after the string |