Skip to content

Documentation / @cashconnect-js/core / templates/string-parser

StringParser

Defined in: cashconnect-js/packages/core/src/templates/string-parser.ts:11

Parses and processes template strings with embedded CashASM expressions

Constructors

Constructor

ts
new StringParser(compiler, bytecode): StringParser;

Defined in: cashconnect-js/packages/core/src/templates/string-parser.ts:12

Parameters
ParameterType
compilerCompiler
bytecode{ [name: string]: Uint8Array<ArrayBufferLike>; }
Returns

StringParser

Methods

parse()

ts
parse(template): TemplateSegment[];

Defined in: cashconnect-js/packages/core/src/templates/string-parser.ts:22

Parses a template string containing CashASM expressions with type hints

Parameters
ParameterTypeDescription
templatestringThe template string to parse
Returns

TemplateSegment[]

An array of text strings and expression objects