A 'Chunk' in schnack-terms is basically an array of strings with a type-constant. It can be either text or instruction.

The rest is meta-data to be able to print out proper error messages.

See

SchnackInterpreter

Hierarchy

  • SchnackChunk

Constructors

Properties

firstChunkLine: string = ""
linePos: number
tokenData: any[] = []

This array contains the tokens of the chunk. Depending on the type the meaning of the indices can mean different things.

CHUNK_TEXT: [0] => Name/id of the speaker If no speaker is set it'll be an empty String [1] => Text of the speaker [n-2] => Name/id of the last speaker [n-1] => Text of the last speaker

CHUNK_INSTRUCTION [0] => Function/instruction name. EG @if, @set, @message, ... [...] => Parameters depending instruction

If the tokenData is empty it can be ignroed

Methods

Generated using TypeDoc