Click or drag to resize

BaseTreeAdaptorCreateToken Method (IToken)

Tell me how to create a token for use with imaginary token nodes. For example, there is probably no input symbol associated with imaginary token DECL, but you need to create it as a payload or whatever for the DECL node as in ^(DECL type ID).

Namespace:  Stimulsoft.Data.Expressions.Antlr.Runtime.Tree
Assembly:  Stimulsoft.Data (in Stimulsoft.Data.dll) Version: 2019.3.1.0
Syntax
public abstract IToken CreateToken(
	IToken fromToken
)

Parameters

fromToken
Type: Stimulsoft.Data.Expressions.Antlr.RuntimeIToken

[Missing <param name="fromToken"/> documentation for "M:Stimulsoft.Data.Expressions.Antlr.Runtime.Tree.BaseTreeAdaptor.CreateToken(Stimulsoft.Data.Expressions.Antlr.Runtime.IToken)"]

Return Value

Type: IToken

[Missing <returns> documentation for "M:Stimulsoft.Data.Expressions.Antlr.Runtime.Tree.BaseTreeAdaptor.CreateToken(Stimulsoft.Data.Expressions.Antlr.Runtime.IToken)"]

Remarks
This is a variant of createToken where the new token is derived from an actual real input token. Typically this is for converting '{' tokens to BLOCK etc... You'll see r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ; If you care what the token payload objects' type is, you should override this method and any other createToken variant.
See Also