interface TwingParser { parent: null | TwingBaseNode<any, TwingBaseNodeAttributes, TwingBaseNodeChildren>; addImportedSymbol(type: "template",
alias: string): void; addImportedSymbol(type: "method",
alias: string,
name: string,
node: TwingBaseNode<any, { name: string; }, TwingBaseNodeChildren>): void; addTrait(trait: TwingTraitNode): void; embedTemplate(template: TwingTemplateNode): void; getBlock(name: string): null | TwingBlockNode; getVarName(prefix?: string): string; isMainScope(): boolean; parse(stream: TwingTokenStream,
tag?: null | string,
test?: null | ((token: Token) => boolean)): TwingTemplateNode; parseArguments(stream: TwingTokenStream,
namedArguments?: boolean,
definition?: boolean,
allowArrow?: true): TwingArrayNode; parseAssignmentExpression(stream: TwingTokenStream): TwingBaseNode<null, {}, { [
key:
number]
: TwingAssignmentNode; }>; parseExpression(stream: TwingTokenStream,
precedence?: number,
allowArrow?: true): TwingExpressionNode; parseFilterDefinitions(stream: TwingTokenStream): { arguments: TwingArrayNode; name: string; }[]; parseFilterExpressionRaw(stream: TwingTokenStream,
node: TwingBaseExpressionNode,
tag?: null | string): TwingFilterNode; parseMultiTargetExpression(stream: TwingTokenStream): TwingBaseNode<null, TwingBaseNodeAttributes, TwingBaseNodeChildren>; peekBlockStack(): string; popBlockStack(): void; popLocalScope(): void; pushBlockStack(name: string): void; pushLocalScope(): void; setBlock(name: string,
node: TwingBlockNode): void; setMacro(name: string,
node: TwingMacroNode): void; subparse(stream: TwingTokenStream,
tag: null | string,
test: null | ((token: Token) => boolean)): TwingBaseNode<any, TwingBaseNodeAttributes, TwingBaseNodeChildren>; } Properties
Methods
addImportedSymbol
- addImportedSymbol(type, alias): void
Parameters
- type: "template"
- alias: string
Returns void
- addImportedSymbol(type, alias, name, node): void
Returns void
addTrait
- addTrait(trait): void
Returns void
embedTemplate
- embedTemplate(template): void
Returns void
getVarName
- getVarName(prefix?): string
Returns string
isMainScope
- isMainScope(): boolean
Returns boolean
parseArguments
- parseArguments(stream, namedArguments?, definition?, allowArrow?): TwingArrayNode
Parameters
- stream: TwingTokenStream
Optional
namedArguments: booleanOptional
definition: booleanOptional
allowArrow: true
parseAssignmentExpression
parseMultiTargetExpression
peekBlockStack
- peekBlockStack(): string
Returns string
popBlockStack
- popBlockStack(): void
Returns void
popLocalScope
- popLocalScope(): void
Returns void
pushBlockStack
- pushBlockStack(name): void
Returns void
pushLocalScope
- pushLocalScope(): void
Returns void
setBlock
- setBlock(name, node): void
Returns void
setMacro
- setMacro(name, node): void
Returns void