Class: SpecialToken
Constructors
new SpecialToken()
ts
new SpecialToken(value: BuiltinSpecialTokenValue): SpecialToken
Parameters
Parameter | Type |
---|---|
value | BuiltinSpecialTokenValue |
Returns
Defined in
Properties
value
ts
readonly value: BuiltinSpecialTokenValue;
Defined in
Methods
toString()
ts
toString(): BuiltinSpecialTokenValue
Returns
Defined in
tokenize()
ts
tokenize(tokenizer: Tokenizer): Token[]
Parameters
Parameter | Type |
---|---|
tokenizer | Tokenizer |
Returns
Token
[]
Defined in
toJSON()
ts
toJSON(): LlamaTextSpecialTokenJSON
Returns
Defined in
fromJSON()
ts
static fromJSON(json: LlamaTextSpecialTokenJSON): SpecialToken
Parameters
Parameter | Type |
---|---|
json | LlamaTextSpecialTokenJSON |
Returns
Defined in
isSpecialTokenJSON()
ts
static isSpecialTokenJSON(value: LlamaTextJSONValue): value is LlamaTextSpecialTokenJSON
Parameters
Parameter | Type |
---|---|
value | LlamaTextJSONValue |
Returns
value is LlamaTextSpecialTokenJSON
Defined in
getTokenToValueMap()
ts
static getTokenToValueMap(tokenizer: Tokenizer): ReadonlyMap<undefined | Token, BuiltinSpecialTokenValue>
Parameters
Parameter | Type |
---|---|
tokenizer | Tokenizer |
Returns
ReadonlyMap
<undefined
| Token
, BuiltinSpecialTokenValue
>