Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cashc

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cashc - npm Package Compare versions

Comparing version 0.10.0-next.2 to 0.10.0-next.3

9

dist/artifact/Artifact.d.ts

@@ -1,9 +0,4 @@

import { Artifact, LogEntry, RequireMessage, Script } from '@cashscript/utils';
import { Artifact, DebugInformation, Script } from '@cashscript/utils';
import { Ast } from '../ast/AST.js';
export declare function generateArtifact(ast: Ast, script: Script, source: string, debug: {
script: Script;
sourceMap: string;
logs: LogEntry[];
requireMessages: RequireMessage[];
}): Artifact;
export declare function generateArtifact(ast: Ast, script: Script, source: string, debug: DebugInformation): Artifact;
export declare function stripArtifact(artifact: Artifact): Omit<Artifact, 'debug'>;

@@ -1,4 +0,3 @@

import { scriptToAsm, scriptToBytecode, } from '@cashscript/utils';
import { scriptToAsm, } from '@cashscript/utils';
import { version } from '../index.js';
import { binToHex } from '@bitauth/libauth';
export function generateArtifact(ast, script, source, debug) {

@@ -16,3 +15,2 @@ const { contract } = ast;

const bytecode = scriptToAsm(script);
const debugBytecode = binToHex(scriptToBytecode(debug.script));
return {

@@ -24,8 +22,3 @@ contractName: contract.name,

source,
debug: {
bytecode: debugBytecode,
sourceMap: debug.sourceMap,
logs: debug.logs,
requireMessages: debug.requireMessages,
},
debug,
compiler: {

@@ -32,0 +25,0 @@ name: 'cashc',

@@ -9,3 +9,3 @@ import { Type } from '@cashscript/utils';

export declare abstract class Node {
location?: Location;
location: Location;
abstract accept<T>(visitor: AstVisitor<T>): T;

@@ -165,5 +165,7 @@ }

}
export declare abstract class LiteralNode extends ExpressionNode {
export declare abstract class LiteralNode<T = any> extends ExpressionNode {
value: T;
toString(): string;
}
export declare class BoolLiteralNode extends LiteralNode {
export declare class BoolLiteralNode extends LiteralNode<boolean> {
value: boolean;

@@ -173,3 +175,3 @@ constructor(value: boolean);

}
export declare class IntLiteralNode extends LiteralNode {
export declare class IntLiteralNode extends LiteralNode<bigint> {
value: bigint;

@@ -179,3 +181,3 @@ constructor(value: bigint);

}
export declare class StringLiteralNode extends LiteralNode {
export declare class StringLiteralNode extends LiteralNode<string> {
value: string;

@@ -186,5 +188,6 @@ quote: string;

}
export declare class HexLiteralNode extends LiteralNode {
export declare class HexLiteralNode extends LiteralNode<Uint8Array> {
value: Uint8Array;
constructor(value: Uint8Array);
toString(): string;
accept<T>(visitor: AstVisitor<T>): T;

@@ -197,7 +200,2 @@ }

}
export declare class ConsoleParameterNode extends Node {
message?: string | undefined;
identifier?: string | undefined;
constructor(message?: string | undefined, identifier?: string | undefined);
accept<T>(visitor: AstVisitor<T>): T;
}
export declare type ConsoleParameterNode = LiteralNode | IdentifierNode;
import { PrimitiveType, BytesType } from '@cashscript/utils';
import { binToHex } from '@bitauth/libauth';
export class Node {

@@ -214,2 +215,5 @@ }

export class LiteralNode extends ExpressionNode {
toString() {
return `${this.value}`;
}
}

@@ -253,2 +257,5 @@ export class BoolLiteralNode extends LiteralNode {

}
toString() {
return `0x${binToHex(this.value)}`;
}
accept(visitor) {

@@ -267,13 +274,2 @@ return visitor.visitHexLiteral(this);

}
// TODO: Couldn't we just use existing nodes for this? e.g. IdentifierNode + StringLiteralNode etc.
export class ConsoleParameterNode extends Node {
constructor(message, identifier) {
super();
this.message = message;
this.identifier = identifier;
}
accept(visitor) {
return visitor.visitConsoleParameter(this);
}
}
//# sourceMappingURL=AST.js.map

@@ -1,7 +0,6 @@

import { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor.js';
import { ParseTree } from 'antlr4ts/tree/ParseTree.js';
import { Node, SourceFileNode, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, ExpressionNode, LiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode, ConsoleParameterNode } from './AST.js';
import type { ContractDefinitionContext, FunctionDefinitionContext, VariableDefinitionContext, TupleAssignmentContext, ParameterContext, AssignStatementContext, IfStatementContext, FunctionCallContext, CastContext, LiteralContext, SourceFileContext, BlockContext, TimeOpStatementContext, ArrayContext, ParenthesisedContext, FunctionCallExpressionContext, UnaryOpContext, BinaryOpContext, IdentifierContext, LiteralExpressionContext, TupleIndexOpContext, RequireStatementContext, PragmaDirectiveContext, InstantiationContext, NullaryOpContext, UnaryIntrospectionOpContext, ConsoleStatementContext, ConsoleParameterContext } from '../grammar/CashScriptParser.js';
import type { CashScriptVisitor } from '../grammar/CashScriptVisitor.js';
export default class AstBuilder extends AbstractParseTreeVisitor<Node> implements CashScriptVisitor<Node> {
import { ParseTree, ParseTreeVisitor } from 'antlr4';
import { Node, SourceFileNode, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, ExpressionNode, StatementNode, LiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode, ConsoleParameterNode } from './AST.js';
import type { ContractDefinitionContext, FunctionDefinitionContext, VariableDefinitionContext, TupleAssignmentContext, ParameterContext, AssignStatementContext, IfStatementContext, FunctionCallContext, CastContext, LiteralContext, SourceFileContext, BlockContext, TimeOpStatementContext, ArrayContext, ParenthesisedContext, FunctionCallExpressionContext, UnaryOpContext, BinaryOpContext, IdentifierContext, LiteralExpressionContext, TupleIndexOpContext, RequireStatementContext, PragmaDirectiveContext, InstantiationContext, NullaryOpContext, UnaryIntrospectionOpContext, ConsoleStatementContext, ConsoleParameterContext, StatementContext, RequireMessageContext } from '../grammar/CashScriptParser.js';
import CashScriptVisitor from '../grammar/CashScriptVisitor.js';
export default class AstBuilder extends ParseTreeVisitor<Node> implements CashScriptVisitor<Node> {
private tree;

@@ -16,2 +15,3 @@ constructor(tree: ParseTree);

visitParameter(ctx: ParameterContext): ParameterNode;
visitStatement(ctx: StatementContext): StatementNode;
visitVariableDefinition(ctx: VariableDefinitionContext): VariableDefinitionNode;

@@ -40,3 +40,3 @@ visitTupleAssignment(ctx: TupleAssignmentContext): TupleAssignmentNode;

createIntLiteral(ctx: LiteralContext): IntLiteralNode;
createStringLiteral(ctx: LiteralContext): StringLiteralNode;
createStringLiteral(ctx: LiteralContext | RequireMessageContext): StringLiteralNode;
createDateLiteral(ctx: LiteralContext): IntLiteralNode;

@@ -46,2 +46,3 @@ createHexLiteral(ctx: LiteralContext): HexLiteralNode;

visitConsoleParameter(ctx: ConsoleParameterContext): ConsoleParameterNode;
visitChildren(): Node;
}

@@ -0,6 +1,6 @@

import { ParseTreeVisitor } from 'antlr4';
import { hexToBin } from '@bitauth/libauth';
import { parseType } from '@cashscript/utils';
import { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor.js';
import semver from 'semver';
import { SourceFileNode, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode, ConsoleParameterNode, } from './AST.js';
import { SourceFileNode, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode, } from './AST.js';
import { Location } from './Location.js';

@@ -11,3 +11,3 @@ import { NumberUnit, } from './Globals.js';

import { ParseError, VersionError } from '../Errors.js';
export default class AstBuilder extends AbstractParseTreeVisitor {
export default class AstBuilder extends ParseTreeVisitor {
constructor(tree) {

@@ -24,3 +24,3 @@ super();

visitSourceFile(ctx) {
ctx.pragmaDirective().forEach((pragma) => {
ctx.pragmaDirective_list().forEach((pragma) => {
this.processPragma(pragma);

@@ -34,3 +34,3 @@ });

processPragma(ctx) {
const pragmaName = getPragmaName(ctx.pragmaName().text);
const pragmaName = getPragmaName(ctx.pragmaName().getText());
if (pragmaName !== PragmaName.CASHSCRIPT)

@@ -40,5 +40,5 @@ throw new Error(); // Shouldn't happen

const actualVersion = version.replace(/-.*/g, '');
ctx.pragmaValue().versionConstraint().forEach((constraint) => {
ctx.pragmaValue().versionConstraint_list().forEach((constraint) => {
const op = getVersionOpFromCtx(constraint.versionOperator());
const versionConstraint = `${op}${constraint.VersionLiteral().text}`;
const versionConstraint = `${op}${constraint.VersionLiteral().getText()}`;
if (!semver.satisfies(actualVersion, versionConstraint)) {

@@ -50,5 +50,5 @@ throw new VersionError(actualVersion, versionConstraint);

visitContractDefinition(ctx) {
const name = ctx.Identifier().text;
const parameters = ctx.parameterList().parameter().map((p) => this.visit(p));
const functions = ctx.functionDefinition().map((f) => this.visit(f));
const name = ctx.Identifier().getText();
const parameters = ctx.parameterList().parameter_list().map((p) => this.visit(p));
const functions = ctx.functionDefinition_list().map((f) => this.visit(f));
const contract = new ContractNode(name, parameters, functions);

@@ -59,5 +59,5 @@ contract.location = Location.fromCtx(ctx);

visitFunctionDefinition(ctx) {
const name = ctx.Identifier().text;
const parameters = ctx.parameterList().parameter().map((p) => this.visit(p));
const statements = ctx.statement().map((s) => this.visit(s));
const name = ctx.Identifier().getText();
const parameters = ctx.parameterList().parameter_list().map((p) => this.visit(p));
const statements = ctx.statement_list().map((s) => this.visit(s));
const block = new BlockNode(statements);

@@ -70,4 +70,4 @@ block.location = Location.fromCtx(ctx);

visitParameter(ctx) {
const type = parseType(ctx.typeName().text);
const name = ctx.Identifier().text;
const type = parseType(ctx.typeName().getText());
const name = ctx.Identifier().getText();
const parameter = new ParameterNode(type, name);

@@ -77,6 +77,10 @@ parameter.location = Location.fromCtx(ctx);

}
visitStatement(ctx) {
// Statement nodes only have a single child, so we can just visit that child
return this.visit(ctx.getChild(0));
}
visitVariableDefinition(ctx) {
const type = parseType(ctx.typeName().text);
const modifiers = ctx.modifier().map((modifier) => modifier.text);
const name = ctx.Identifier().text;
const type = parseType(ctx.typeName().getText());
const modifiers = ctx.modifier_list().map((modifier) => modifier.getText());
const name = ctx.Identifier().getText();
const expression = this.visit(ctx.expression());

@@ -89,5 +93,8 @@ const variableDefinition = new VariableDefinitionNode(type, modifiers, name, expression);

const expression = this.visit(ctx.expression());
const names = ctx.Identifier();
const types = ctx.typeName();
const [var1, var2] = names.map((name, i) => ({ name: name.text, type: parseType(types[i].text) }));
const names = ctx.Identifier_list();
const types = ctx.typeName_list();
const [var1, var2] = names.map((name, i) => ({
name: name.getText(),
type: parseType(types[i].getText()),
}));
const tupleAssignment = new TupleAssignmentNode(var1, var2, expression);

@@ -98,3 +105,3 @@ tupleAssignment.location = Location.fromCtx(ctx);

visitAssignStatement(ctx) {
const identifier = new IdentifierNode(ctx.Identifier().text);
const identifier = new IdentifierNode(ctx.Identifier().getText());
identifier.location = Location.fromToken(ctx.Identifier().symbol);

@@ -108,4 +115,4 @@ const expression = this.visit(ctx.expression());

const expression = this.visit(ctx.expression());
const message = ctx.StringLiteral() && this.createStringLiteral(ctx)?.value;
const timeOp = new TimeOpNode(ctx.TxVar().text, expression, message);
const message = ctx.requireMessage() ? this.createStringLiteral(ctx.requireMessage()).value : undefined;
const timeOp = new TimeOpNode(ctx.TxVar().getText(), expression, message);
timeOp.location = Location.fromCtx(ctx);

@@ -116,3 +123,3 @@ return timeOp;

const expression = this.visit(ctx.expression());
const message = ctx.StringLiteral() && this.createStringLiteral(ctx)?.value;
const message = ctx.requireMessage() ? this.createStringLiteral(ctx.requireMessage()).value : undefined;
const require = new RequireNode(expression, message);

@@ -131,3 +138,3 @@ require.location = Location.fromCtx(ctx);

visitBlock(ctx) {
const statements = ctx.statement().map((s) => this.visit(s));
const statements = ctx.statement_list().map((s) => this.visit(s));
const block = new BlockNode(statements);

@@ -141,3 +148,3 @@ block.location = Location.fromCtx(ctx);

visitCast(ctx) {
const type = parseType(ctx.typeName().text);
const type = parseType(ctx.typeName().getText());
const expression = this.visit(ctx._castable);

@@ -153,5 +160,5 @@ const size = ctx._size && this.visit(ctx._size);

visitFunctionCall(ctx) {
const identifier = new IdentifierNode(ctx.Identifier().text);
const identifier = new IdentifierNode(ctx.Identifier().getText());
identifier.location = Location.fromToken(ctx.Identifier().symbol);
const parameters = ctx.expressionList().expression().map((e) => this.visit(e));
const parameters = ctx.expressionList().expression_list().map((e) => this.visit(e));
const functionCall = new FunctionCallNode(identifier, parameters);

@@ -162,5 +169,5 @@ functionCall.location = Location.fromCtx(ctx);

visitInstantiation(ctx) {
const identifier = new IdentifierNode(ctx.Identifier().text);
const identifier = new IdentifierNode(ctx.Identifier().getText());
identifier.location = Location.fromToken(ctx.Identifier().symbol);
const parameters = ctx.expressionList().expression().map((e) => this.visit(e));
const parameters = ctx.expressionList().expression_list().map((e) => this.visit(e));
const instantiation = new InstantiationNode(identifier, parameters);

@@ -178,3 +185,3 @@ instantiation.location = Location.fromCtx(ctx);

visitNullaryOp(ctx) {
const operator = ctx.text;
const operator = ctx.getText();
const nullaryOp = new NullaryOpNode(operator);

@@ -207,3 +214,3 @@ nullaryOp.location = Location.fromCtx(ctx);

visitArray(ctx) {
const elements = ctx.expression().map((e) => this.visit(e));
const elements = ctx.expression_list().map((e) => this.visit(e));
const array = new ArrayNode(elements);

@@ -214,3 +221,3 @@ array.location = Location.fromCtx(ctx);

visitIdentifier(ctx) {
const identifier = new IdentifierNode(ctx.Identifier().text);
const identifier = new IdentifierNode(ctx.Identifier().getText());
identifier.location = Location.fromCtx(ctx);

@@ -241,3 +248,3 @@ return identifier;

createBooleanLiteral(ctx) {
const boolString = ctx.BooleanLiteral().text;
const boolString = ctx.BooleanLiteral().getText();
const boolValue = boolString === 'true';

@@ -250,4 +257,4 @@ const booleanLiteral = new BoolLiteralNode(boolValue);

const numberCtx = ctx.numberLiteral();
const numberString = numberCtx.NumberLiteral().text;
const numberUnit = numberCtx.NumberUnit()?.text;
const numberString = numberCtx.NumberLiteral().getText();
const numberUnit = numberCtx.NumberUnit()?.getText();
const numberValue = BigInt(numberString) * BigInt(numberUnit ? NumberUnit[numberUnit.toUpperCase()] : 1);

@@ -259,3 +266,3 @@ const intLiteral = new IntLiteralNode(numberValue);

createStringLiteral(ctx) {
const rawString = ctx.StringLiteral().text;
const rawString = ctx.StringLiteral().getText();
const stringValue = rawString.substring(1, rawString.length - 1);

@@ -268,3 +275,3 @@ const quote = rawString.substring(0, 1);

createDateLiteral(ctx) {
const rawString = ctx.DateLiteral().text;
const rawString = ctx.DateLiteral().getText();
const stringValue = rawString.substring(6, rawString.length - 2).trim();

@@ -283,3 +290,3 @@ if (!/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d$/.test(stringValue)) {

createHexLiteral(ctx) {
const hexString = ctx.HexLiteral().text;
const hexString = ctx.HexLiteral().getText();
const hexValue = hexToBin(hexString.substring(2));

@@ -291,3 +298,5 @@ const hexLiteral = new HexLiteralNode(hexValue);

visitConsoleStatement(ctx) {
const parameters = ctx.consoleParameterList().consoleParameter().map((p) => this.visit(p));
const parameters = ctx.consoleParameterList()
.consoleParameter_list()
.map((p) => this.visit(p));
const node = new ConsoleStatementNode(parameters);

@@ -298,12 +307,12 @@ node.location = Location.fromCtx(ctx);

visitConsoleParameter(ctx) {
let message = (ctx.BooleanLiteral() ?? ctx.HexLiteral() ?? ctx.NumberLiteral() ?? ctx.StringLiteral())?.text;
if (message?.[0] === '"') {
message = message.slice(1, -1);
}
const identifier = ctx.Identifier()?.text;
const node = new ConsoleParameterNode(message, identifier);
const node = ctx.literal() ? this.createLiteral(ctx.literal()) : new IdentifierNode(ctx.Identifier().getText());
node.location = Location.fromCtx(ctx);
return node;
}
// For safety reasons, we throw an error when the "default" visitChildren is called. *All* nodes
// must have a custom visit method, so that we can be sure that we've covered all cases.
visitChildren() {
throw new Error('Safety Warning: Unhandled node in AST builder');
}
}
//# sourceMappingURL=AstBuilder.js.map

@@ -1,2 +0,2 @@

import { Node, SourceFileNode, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode, ConsoleParameterNode } from './AST.js';
import { Node, SourceFileNode, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode } from './AST.js';
import AstVisitor from './AstVisitor.js';

@@ -29,3 +29,2 @@ export default class AstTraversal extends AstVisitor<Node> {

visitConsoleStatement(node: ConsoleStatementNode): Node;
visitConsoleParameter(node: ConsoleParameterNode): Node;
}

@@ -105,6 +105,3 @@ import AstVisitor from './AstVisitor.js';

}
visitConsoleParameter(node) {
return node;
}
}
//# sourceMappingURL=AstTraversal.js.map

@@ -1,2 +0,2 @@

import { Node, SourceFileNode, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode, ConsoleParameterNode } from './AST.js';
import { Node, SourceFileNode, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode } from './AST.js';
export default abstract class AstVisitor<T> {

@@ -28,3 +28,2 @@ abstract visitSourceFile(node: SourceFileNode): T;

abstract visitConsoleStatement(node: ConsoleStatementNode): T;
abstract visitConsoleParameter(node: ConsoleParameterNode): T;
visit(node: Node): T;

@@ -31,0 +30,0 @@ visitOptional(node?: Node): T | undefined;

@@ -1,3 +0,2 @@

import type { ParserRuleContext } from 'antlr4ts/ParserRuleContext.js';
import type { Token } from 'antlr4ts';
import type { ParserRuleContext, Token } from 'antlr4';
import { LocationI } from '@cashscript/utils';

@@ -8,4 +7,4 @@ export declare class Location implements LocationI {

constructor(start: Point, end: Point);
static fromCtx(ctx: ParserRuleContext): Location | undefined;
static fromToken(token: Token): Location | undefined;
static fromCtx(ctx: ParserRuleContext): Location;
static fromToken(token: Token): Location;
static fromObject(object: LocationI): Location;

@@ -12,0 +11,0 @@ text(code: string): string;

@@ -9,4 +9,4 @@ export class Location {

const textLength = (stop.text ?? '').length;
const start = new Point(ctx.start.line, ctx.start.charPositionInLine);
const end = new Point(stop.line, stop.charPositionInLine + textLength);
const start = new Point(ctx.start.line, ctx.start.column);
const end = new Point(stop.line, stop.column + textLength);
return new Location(start, end);

@@ -16,4 +16,4 @@ }

const textLength = (token.text ?? '').length;
const start = new Point(token.line, token.charPositionInLine);
const end = new Point(token.line, token.charPositionInLine + textLength);
const start = new Point(token.line, token.column);
const end = new Point(token.line, token.column + textLength);
return new Location(start, end);

@@ -20,0 +20,0 @@ }

@@ -1,2 +0,2 @@

import { VersionOperatorContext } from '../grammar/CashScriptParser.js';
import type { VersionOperatorContext } from '../grammar/CashScriptParser.js';
export declare enum PragmaName {

@@ -3,0 +3,0 @@ CASHSCRIPT = "cashscript"

@@ -19,4 +19,4 @@ export var PragmaName;

export function getVersionOpFromCtx(ctx) {
return (ctx ? ctx.text : '=');
return (ctx ? ctx.getText() : '=');
}
//# sourceMappingURL=Pragma.js.map

@@ -1,2 +0,2 @@

import { ANTLRErrorListener, RecognitionException, Recognizer } from 'antlr4ts';
import { ErrorListener, RecognitionException, Recognizer } from 'antlr4';
/**

@@ -6,5 +6,5 @@ * ANTLR Error Listener that immediately throws on error. This is used so that

*/
export default class ThrowingErrorListener implements ANTLRErrorListener<any> {
static readonly INSTANCE: ThrowingErrorListener;
syntaxError<T>(recognizer: Recognizer<T, any>, offendingSymbol: T, line: number, charPositionInLine: number, message: string, e?: RecognitionException): void;
export default class ThrowingErrorListener<TSymbol> extends ErrorListener<TSymbol> {
static readonly INSTANCE: ThrowingErrorListener<unknown>;
syntaxError(recognizer: Recognizer<TSymbol>, offendingSymbol: TSymbol, line: number, charPositionInLine: number, message: string, e?: RecognitionException): void;
}

@@ -0,1 +1,3 @@

/* eslint-disable @typescript-eslint/no-unused-vars */
import { ErrorListener } from 'antlr4';
import { ParseError } from '../Errors.js';

@@ -7,3 +9,3 @@ import { Point } from './Location.js';

*/
export default class ThrowingErrorListener {
export default class ThrowingErrorListener extends ErrorListener {
syntaxError(recognizer, offendingSymbol, line, charPositionInLine, message, e) {

@@ -10,0 +12,0 @@ const capitalisedMessage = message.charAt(0).toUpperCase() + message.slice(1);

@@ -1,3 +0,4 @@

import { optimiseBytecode } from '@cashscript/utils';
import { ANTLRInputStream, CommonTokenStream } from 'antlr4ts';
import { CharStream, CommonTokenStream } from 'antlr4';
import { binToHex } from '@bitauth/libauth';
import { optimiseBytecode, scriptToBytecode } from '@cashscript/utils';
import fs from 'fs';

@@ -8,4 +9,4 @@ import { generateArtifact } from './artifact/Artifact.js';

import GenerateTargetTraversal from './generation/GenerateTargetTraversal.js';
import { CashScriptLexer } from './grammar/CashScriptLexer.js';
import { CashScriptParser } from './grammar/CashScriptParser.js';
import CashScriptLexer from './grammar/CashScriptLexer.js';
import CashScriptParser from './grammar/CashScriptParser.js';
import SymbolTableTraversal from './semantic/SymbolTableTraversal.js';

@@ -18,17 +19,18 @@ import TypeCheckTraversal from './semantic/TypeCheckTraversal.js';

// Semantic analysis
const symbolTableTraversal = new SymbolTableTraversal();
ast = ast.accept(symbolTableTraversal);
ast = ast.accept(new SymbolTableTraversal());
ast = ast.accept(new TypeCheckTraversal());
ast = ast.accept(new EnsureFinalRequireTraversal());
// Code generation
const traversal = new GenerateTargetTraversal(symbolTableTraversal.logSymbols);
const traversal = new GenerateTargetTraversal();
ast = ast.accept(traversal);
// Bytecode optimisation
const optimisedBytecode = optimiseBytecode(traversal.output);
return generateArtifact(ast, optimisedBytecode, code, {
script: traversal.output,
sourceMap: traversal.souceMap,
// Attach debug information
const debug = {
bytecode: binToHex(scriptToBytecode(traversal.output)),
sourceMap: traversal.sourceMap,
logs: traversal.consoleLogs,
requireMessages: traversal.requireMessages,
});
};
return generateArtifact(ast, optimisedBytecode, code, debug);
}

@@ -41,3 +43,3 @@ export function compileFile(codeFile) {

// Lexing (throwing on errors)
const inputStream = new ANTLRInputStream(code);
const inputStream = new CharStream(code);
const lexer = new CashScriptLexer(inputStream);

@@ -44,0 +46,0 @@ lexer.removeErrorListeners();

import { Script, LogEntry, RequireMessage } from '@cashscript/utils';
import { ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, SourceFileNode, Node, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode } from '../ast/AST.js';
import AstTraversal from '../ast/AstTraversal.js';
import { Symbol } from '../ast/SymbolTable.js';
export default class GenerateTargetTraversalWithLocation extends AstTraversal {
private logSymbols;
private locationData;
souceMap: string;
sourceMap: string;
output: Script;

@@ -16,3 +14,2 @@ stack: string[];

private constructorParameterCount;
constructor(logSymbols: Symbol[]);
private emit;

@@ -24,7 +21,8 @@ private pushToStack;

private getStackIndex;
private getCurrentInstructionPointer;
visitSourceFile(node: SourceFileNode): Node;
visitContract(node: ContractNode): Node;
visitFunctionDefinition(node: FunctionDefinitionNode): Node;
removeFinalVerify(node: Node): void;
cleanStack(node: Node): void;
removeFinalVerify(functionBodyNode: Node): void;
cleanStack(functionBodyNode: Node): void;
visitParameter(node: ParameterNode): Node;

@@ -37,2 +35,3 @@ visitVariableDefinition(node: VariableDefinitionNode): Node;

visitRequire(node: RequireNode): Node;
visitConsoleStatement(node: ConsoleStatementNode): Node;
visitBranch(node: BranchNode): Node;

@@ -55,3 +54,2 @@ removeScopedVariables(depthBeforeScope: number, node: Node): void;

visitHexLiteral(node: HexLiteralNode): Node;
visitConsoleStatement(node: ConsoleStatementNode): Node;
}
import { hexToBin } from '@bitauth/libauth';
import { asmToScript, encodeBool, encodeInt, encodeString, Op, PrimitiveType, resultingType, scriptToAsm, generateSourceMap, } from '@cashscript/utils';
import { HexLiteralNode, } from '../ast/AST.js';
import { asmToScript, encodeBool, encodeInt, encodeString, Op, PrimitiveType, resultingType, scriptToAsm, generateSourceMap, PositionHint, } from '@cashscript/utils';
import { IdentifierNode, HexLiteralNode, } from '../ast/AST.js';
import AstTraversal from '../ast/AstTraversal.js';

@@ -8,7 +8,5 @@ import { GlobalFunction, Class } from '../ast/Globals.js';

import { compileBinaryOp, compileCast, compileGlobalFunction, compileNullaryOp, compileTimeOp, compileUnaryOp, } from './utils.js';
import { ParseError } from '../Errors.js';
export default class GenerateTargetTraversalWithLocation extends AstTraversal {
constructor(logSymbols) {
super();
this.logSymbols = logSymbols;
constructor() {
super(...arguments);
this.locationData = []; // detailed location data needed for sourcemap creation

@@ -21,10 +19,10 @@ this.output = [];

}
emit(op, location, positionHint) {
emit(op, locationData) {
if (Array.isArray(op)) {
op.forEach((element) => this.output.push(element));
op.forEach(() => this.locationData.push([location, positionHint]));
op.forEach(() => this.locationData.push(locationData));
}
else {
this.output.push(op);
this.locationData.push([location, positionHint]);
this.locationData.push(locationData);
}

@@ -57,2 +55,6 @@ }

}
getCurrentInstructionPointer() {
// instruction pointer is the count of emitted opcodes + number of constructor data pushes
return this.output.length + this.constructorParameterCount;
}
visitSourceFile(node) {

@@ -62,3 +64,3 @@ node.contract = this.visit(node.contract);

this.output = asmToScript(scriptToAsm(this.output));
this.souceMap = generateSourceMap(this.locationData);
this.sourceMap = generateSourceMap(this.locationData);
return node;

@@ -75,25 +77,26 @@ }

node.functions = node.functions.map((f, i) => {
const locationData = { location: f.location };
const stackCopy = [...this.stack];
const selectorIndex = this.getStackIndex('$$');
this.emit(encodeInt(BigInt(selectorIndex)), f.location);
this.emit(encodeInt(BigInt(selectorIndex)), locationData);
if (i === node.functions.length - 1) {
this.emit(Op.OP_ROLL, f.location);
this.emit(Op.OP_ROLL, locationData);
this.removeFromStack(selectorIndex);
}
else {
this.emit(Op.OP_PICK, f.location);
this.emit(Op.OP_PICK, locationData);
}
// All functions are if-else statements, except the final one which is
// enforced with NUMEQUALVERIFY
this.emit(encodeInt(BigInt(i)), f.location);
this.emit(Op.OP_NUMEQUAL, f.location);
this.emit(encodeInt(BigInt(i)), locationData);
this.emit(Op.OP_NUMEQUAL, locationData);
if (i < node.functions.length - 1) {
this.emit(Op.OP_IF, f.location);
this.emit(Op.OP_IF, locationData);
}
else {
this.emit(Op.OP_VERIFY, f.location);
this.emit(Op.OP_VERIFY, locationData);
}
f = this.visit(f);
if (i < node.functions.length - 1) {
this.emit(Op.OP_ELSE, f.location, 1);
this.emit(Op.OP_ELSE, { ...locationData, positionHint: PositionHint.END });
}

@@ -104,3 +107,3 @@ this.stack = [...stackCopy];

for (let i = 0; i < node.functions.length - 1; i += 1) {
this.emit(Op.OP_ENDIF, node.location, 1);
this.emit(Op.OP_ENDIF, { location: node.location, positionHint: PositionHint.END });
}

@@ -118,7 +121,7 @@ }

}
removeFinalVerify(node) {
removeFinalVerify(functionBodyNode) {
// After EnsureFinalRequireTraversal, we know that the final opcodes are either
// "OP_VERIFY", "OP_CHECK{LOCKTIME|SEQUENCE}VERIFY OP_DROP" or "OP_ENDIF"
const finalOp = this.output.pop();
const [location] = this.locationData.pop();
const { location } = this.locationData.pop();
// If the final op is OP_VERIFY and the stack size is less than 4 we remove it from the script

@@ -133,3 +136,3 @@ // - We have the stack size check because it is more efficient to use 2DROP rather than NIP

else {
this.emit(finalOp, location, 1);
this.emit(finalOp, { location, positionHint: PositionHint.END });
// At this point there is no verification value left on the stack:

@@ -139,11 +142,11 @@ // - scoped stack is cleared inside branch ended by OP_ENDIF

// so we add OP_1 to the script (indicating success)
this.emit(Op.OP_1, node.location, 1);
this.emit(Op.OP_1, { location: functionBodyNode.location, positionHint: PositionHint.END });
this.pushToStack('(value)');
}
}
cleanStack(node) {
cleanStack(functionBodyNode) {
// Keep final verification value, OP_NIP the other stack values
const stackSize = this.stack.length;
for (let i = 0; i < stackSize - 1; i += 1) {
this.emit(Op.OP_NIP, node.location, 1);
this.emit(Op.OP_NIP, { location: functionBodyNode.location, positionHint: PositionHint.END });
this.nipFromStack();

@@ -184,13 +187,14 @@ }

emitReplace(index, node) {
this.emit(encodeInt(BigInt(index)), node.location);
this.emit(Op.OP_ROLL, node.location);
this.emit(Op.OP_DROP, node.location);
const locationData = { location: node.location };
this.emit(encodeInt(BigInt(index)), locationData);
this.emit(Op.OP_ROLL, locationData);
this.emit(Op.OP_DROP, locationData);
for (let i = 0; i < index - 1; i += 1) {
this.emit(Op.OP_SWAP, node.location);
this.emit(Op.OP_SWAP, locationData);
if (i < index - 2) {
this.emit(Op.OP_TOALTSTACK, node.location);
this.emit(Op.OP_TOALTSTACK, locationData);
}
}
for (let i = 0; i < index - 2; i += 1) {
this.emit(Op.OP_FROMALTSTACK, node.location);
this.emit(Op.OP_FROMALTSTACK, locationData);
}

@@ -201,7 +205,7 @@ }

node.expression = this.visit(node.expression);
this.emit(compileTimeOp(node.timeOp), node.location, 1);
this.emit(compileTimeOp(node.timeOp), { location: node.location, positionHint: PositionHint.END });
// add debug require message
if (node.message) {
this.requireMessages.push({
ip: this.output.length + this.constructorParameterCount - 1,
ip: this.getCurrentInstructionPointer() - 1,
line: node.location.start.line,

@@ -216,7 +220,7 @@ message: node.message,

node.expression = this.visit(node.expression);
this.emit(Op.OP_VERIFY, node.location, 1);
this.emit(Op.OP_VERIFY, { location: node.location, positionHint: PositionHint.END });
// add debug require message
if (node.message) {
this.requireMessages.push({
ip: this.output.length + this.constructorParameterCount - 1,
ip: this.getCurrentInstructionPointer() - 1,
line: node.location.start.line,

@@ -229,2 +233,26 @@ message: node.message,

}
visitConsoleStatement(node) {
const ip = this.getCurrentInstructionPointer();
const { line } = node.location.start;
// TODO: refactor to use a map instead of array (also in the artifact and other places where console logs and
// require statements are used)
// check if log entry exists for the instruction pointer, create if not
// TODO: Do we really want to merge different console logs at the same instruction pointer?
let index = this.consoleLogs.findIndex((entry) => entry.ip === ip);
if (index === -1) {
index = this.consoleLogs.push({ ip, line, data: [] }) - 1;
}
node.parameters.forEach((parameter) => {
if (parameter instanceof IdentifierNode) {
const symbol = parameter.definition;
const stackIndex = this.getStackIndex(parameter.name);
const type = typeof symbol.type === 'string' ? symbol.type : symbol.toString();
this.consoleLogs[index].data.push({ stackIndex, type });
}
else {
this.consoleLogs[index].data.push(parameter.toString());
}
});
return node;
}
visitBranch(node) {

@@ -234,3 +262,3 @@ node.condition = this.visit(node.condition);

this.scopeDepth += 1;
this.emit(Op.OP_IF, node.ifBlock.location);
this.emit(Op.OP_IF, { location: node.ifBlock.location });
let stackDepth = this.stack.length;

@@ -240,3 +268,3 @@ node.ifBlock = this.visit(node.ifBlock);

if (node.elseBlock) {
this.emit(Op.OP_ELSE, node.elseBlock.location, 1);
this.emit(Op.OP_ELSE, { location: node.elseBlock.location });
stackDepth = this.stack.length;

@@ -246,3 +274,7 @@ node.elseBlock = this.visit(node.elseBlock);

}
this.emit(Op.OP_ENDIF, node.elseBlock ? node.elseBlock.location : node.ifBlock.location, 1);
const endLocationData = {
location: node.elseBlock ? node.elseBlock.location : node.ifBlock.location,
positionHint: PositionHint.END,
};
this.emit(Op.OP_ENDIF, endLocationData);
this.scopeDepth -= 1;

@@ -254,3 +286,3 @@ return node;

for (let i = 0; i < dropCount; i += 1) {
this.emit(Op.OP_DROP, node.location);
this.emit(Op.OP_DROP, { location: node.location });
this.popFromStack();

@@ -264,6 +296,6 @@ }

node.size = this.visit(node.size);
this.emit(Op.OP_NUM2BIN, node.location);
this.emit(Op.OP_NUM2BIN, { location: node.location });
this.popFromStack();
}
this.emit(compileCast(node.expression.type, node.type), node.location, 1);
this.emit(compileCast(node.expression.type, node.type), { location: node.location, positionHint: PositionHint.END });
this.popFromStack();

@@ -278,3 +310,3 @@ this.pushToStack('(value)');

node.parameters = this.visitList(node.parameters);
this.emit(compileGlobalFunction(node.identifier.name), node.location, 1);
this.emit(compileGlobalFunction(node.identifier.name), { location: node.location, positionHint: PositionHint.END });
this.popFromStack(node.parameters.length);

@@ -285,6 +317,6 @@ this.pushToStack('(value)');

visitMultiSig(node) {
this.emit(encodeBool(false), node.location);
this.emit(encodeBool(false), { location: node.location });
this.pushToStack('(value)');
node.parameters = this.visitList(node.parameters);
this.emit(Op.OP_CHECKMULTISIG, node.location, 1);
this.emit(Op.OP_CHECKMULTISIG, { location: node.location, positionHint: PositionHint.END });
const sigs = node.parameters[0];

@@ -297,12 +329,13 @@ const pks = node.parameters[1];

visitInstantiation(node) {
const nodeLocationData = { location: node.location };
if (node.identifier.name === Class.LOCKING_BYTECODE_P2PKH) {
// OP_DUP OP_HASH160 OP_PUSH<20>
this.emit(hexToBin('76a914'), node.location);
this.emit(hexToBin('76a914'), nodeLocationData);
this.pushToStack('(value)');
// <pkh>
this.visit(node.parameters[0]);
this.emit(Op.OP_CAT, node.location);
this.emit(Op.OP_CAT, nodeLocationData);
// OP_EQUAL OP_CHECKSIG
this.emit(hexToBin('88ac'), node.location);
this.emit(Op.OP_CAT, node.location);
this.emit(hexToBin('88ac'), nodeLocationData);
this.emit(Op.OP_CAT, nodeLocationData);
this.popFromStack(2);

@@ -312,10 +345,10 @@ }

// OP_HASH160 OP_PUSH<20>
this.emit(hexToBin('a914'), node.location);
this.emit(hexToBin('a914'), nodeLocationData);
this.pushToStack('(value)');
// <script hash>
this.visit(node.parameters[0]);
this.emit(Op.OP_CAT, node.location);
this.emit(Op.OP_CAT, nodeLocationData);
// OP_EQUAL
this.emit(hexToBin('87'), node.location);
this.emit(Op.OP_CAT, node.location);
this.emit(hexToBin('87'), nodeLocationData);
this.emit(Op.OP_CAT, nodeLocationData);
this.popFromStack(2);

@@ -325,10 +358,10 @@ }

// OP_HASH256 OP_PUSH<32>
this.emit(hexToBin('aa20'), node.location);
this.emit(hexToBin('aa20'), nodeLocationData);
this.pushToStack('(value)');
// <script hash>
this.visit(node.parameters[0]);
this.emit(Op.OP_CAT, node.location);
this.emit(Op.OP_CAT, nodeLocationData);
// OP_EQUAL
this.emit(hexToBin('87'), node.location);
this.emit(Op.OP_CAT, node.location);
this.emit(hexToBin('87'), nodeLocationData);
this.emit(Op.OP_CAT, nodeLocationData);
this.popFromStack(2);

@@ -339,16 +372,17 @@ }

// OP_RETURN
this.emit(hexToBin('6a'), node.location);
this.emit(hexToBin('6a'), nodeLocationData);
this.pushToStack('(value)');
const { elements } = node.parameters[0];
// <VarInt data chunk size (dynamic)>
elements.forEach((el) => {
this.visit(el);
elements.forEach((element) => {
const elementLocationData = { location: element.location };
this.visit(element);
// Push the element's size (and calculate VarInt)
this.emit(Op.OP_SIZE, el.location);
if (el instanceof HexLiteralNode) {
this.emit(Op.OP_SIZE, elementLocationData);
if (element instanceof HexLiteralNode) {
// If the argument is a literal, we know its size
if (el.value.byteLength > 75) {
this.emit(hexToBin('4c'), el.location);
this.emit(Op.OP_SWAP, el.location);
this.emit(Op.OP_CAT, el.location);
if (element.value.byteLength > 75) {
this.emit(hexToBin('4c'), elementLocationData);
this.emit(Op.OP_SWAP, elementLocationData);
this.emit(Op.OP_CAT, elementLocationData);
}

@@ -358,15 +392,15 @@ }

// If the argument is not a literal, the script needs to check size
this.emit(Op.OP_DUP, el.location);
this.emit(encodeInt(75n), el.location);
this.emit(Op.OP_GREATERTHAN, el.location);
this.emit(Op.OP_IF, el.location);
this.emit(hexToBin('4c'), el.location);
this.emit(Op.OP_SWAP, el.location);
this.emit(Op.OP_CAT, el.location);
this.emit(Op.OP_ENDIF, el.location);
this.emit(Op.OP_DUP, elementLocationData);
this.emit(encodeInt(75n), elementLocationData);
this.emit(Op.OP_GREATERTHAN, elementLocationData);
this.emit(Op.OP_IF, elementLocationData);
this.emit(hexToBin('4c'), elementLocationData);
this.emit(Op.OP_SWAP, elementLocationData);
this.emit(Op.OP_CAT, elementLocationData);
this.emit(Op.OP_ENDIF, elementLocationData);
}
// Concat size and arguments
this.emit(Op.OP_SWAP, el.location);
this.emit(Op.OP_CAT, el.location);
this.emit(Op.OP_CAT, el.location);
this.emit(Op.OP_SWAP, elementLocationData);
this.emit(Op.OP_CAT, elementLocationData);
this.emit(Op.OP_CAT, elementLocationData);
this.popFromStack();

@@ -384,8 +418,9 @@ });

node.tuple = this.visit(node.tuple);
const locationData = { location: node.location, positionHint: PositionHint.END };
if (node.index === 0) {
this.emit(Op.OP_DROP, node.location, 1);
this.emit(Op.OP_DROP, locationData);
this.popFromStack();
}
else if (node.index === 1) {
this.emit(Op.OP_NIP, node.location, 1);
this.emit(Op.OP_NIP, locationData);
this.nipFromStack();

@@ -399,3 +434,3 @@ }

const isNumeric = resultingType(node.left.type, node.right.type) === PrimitiveType.INT;
this.emit(compileBinaryOp(node.operator, isNumeric), node.location, 1);
this.emit(compileBinaryOp(node.operator, isNumeric), { location: node.location, positionHint: PositionHint.END });
this.popFromStack(2);

@@ -409,3 +444,3 @@ this.pushToStack('(value)');

node.expression = this.visit(node.expression);
this.emit(compileUnaryOp(node.operator), node.location);
this.emit(compileUnaryOp(node.operator), { location: node.location });
this.popFromStack();

@@ -416,3 +451,3 @@ this.pushToStack('(value)');

visitNullaryOp(node) {
this.emit(compileNullaryOp(node.operator), node.location);
this.emit(compileNullaryOp(node.operator), { location: node.location });
this.pushToStack('(value)');

@@ -423,3 +458,3 @@ return node;

node.elements = this.visitList(node.elements);
this.emit(encodeInt(BigInt(node.elements.length)), node.location, 1);
this.emit(encodeInt(BigInt(node.elements.length)), { location: node.location, positionHint: PositionHint.END });
this.pushToStack('(value)');

@@ -430,11 +465,11 @@ return node;

const stackIndex = this.getStackIndex(node.name);
this.emit(encodeInt(BigInt(stackIndex)), node.location);
this.emit(encodeInt(BigInt(stackIndex)), { location: node.location });
// If the final use is inside an if-statement, we still OP_PICK it
// We do this so that there's no difference in stack depths between execution paths
if (this.isOpRoll(node)) {
this.emit(Op.OP_ROLL, node.location);
this.emit(Op.OP_ROLL, { location: node.location });
this.removeFromStack(stackIndex);
}
else {
this.emit(Op.OP_PICK, node.location);
this.emit(Op.OP_PICK, { location: node.location });
}

@@ -448,3 +483,3 @@ this.pushToStack('(value)');

visitBoolLiteral(node) {
this.emit(encodeBool(node.value), node.location);
this.emit(encodeBool(node.value), { location: node.location });
this.pushToStack('(value)');

@@ -454,3 +489,3 @@ return node;

visitIntLiteral(node) {
this.emit(encodeInt(node.value), node.location);
this.emit(encodeInt(node.value), { location: node.location });
this.pushToStack('(value)');

@@ -460,3 +495,3 @@ return node;

visitStringLiteral(node) {
this.emit(encodeString(node.value), node.location);
this.emit(encodeString(node.value), { location: node.location });
this.pushToStack('(value)');

@@ -466,42 +501,7 @@ return node;

visitHexLiteral(node) {
this.emit(node.value, node.location);
this.emit(node.value, { location: node.location });
this.pushToStack('(value)');
return node;
}
visitConsoleStatement(node) {
// instruction pointer is the count of emitted opcodes + number of constructor data pushes
const ip = this.output.length + this.constructorParameterCount;
const { line } = node.location.start;
// check if log entry exists for the instruction pointer, create if not
let index = this.consoleLogs.findIndex((entry) => entry.ip === ip);
if (index === -1) {
index = this.consoleLogs.push({
ip,
line,
data: [],
}) - 1;
}
node.parameters.forEach((parameter) => {
if (parameter.identifier) {
// we look for all symbols with identifier name
// then take the first which is declared in the nearest code block
const symbol = this.logSymbols
.filter((logSymbol) => logSymbol.name === parameter.identifier)
.sort((a, b) => b.definition?.location?.start.line - a.definition?.location?.start.line)[0];
if (!symbol) {
throw new ParseError(`Undefined reference to symbol ${parameter.identifier} at ${parameter.location?.start}`);
}
const stackIndex = this.getStackIndex(parameter.identifier);
this.consoleLogs[index].data.push({
stackIndex,
type: typeof symbol.type === 'string' ? symbol.type : symbol.toString(),
});
}
else if (parameter.message) {
this.consoleLogs[index].data.push(parameter.message);
}
});
return node;
}
}
//# sourceMappingURL=GenerateTargetTraversal.js.map

@@ -1,6 +0,3 @@

import { ATN } from "antlr4ts/atn/ATN.js";
import { CharStream } from "antlr4ts/CharStream.js";
import { Lexer } from "antlr4ts/Lexer.js";
import { Vocabulary } from "antlr4ts/Vocabulary.js";
export declare class CashScriptLexer extends Lexer {
import { ATN, CharStream, DFA, Lexer } from "antlr4";
export default class CashScriptLexer extends Lexer {
static readonly T__0 = 1;

@@ -78,21 +75,20 @@ static readonly T__1 = 2;

static readonly LINE_COMMENT = 72;
static readonly EOF: number;
static readonly channelNames: string[];
static readonly literalNames: (string | null)[];
static readonly symbolicNames: (string | null)[];
static readonly modeNames: string[];
static readonly ruleNames: string[];
private static readonly _LITERAL_NAMES;
private static readonly _SYMBOLIC_NAMES;
static readonly VOCABULARY: Vocabulary;
get vocabulary(): Vocabulary;
constructor(input: CharStream);
get grammarFileName(): string;
get literalNames(): (string | null)[];
get symbolicNames(): (string | null)[];
get ruleNames(): string[];
get serializedATN(): string;
get serializedATN(): number[];
get channelNames(): string[];
get modeNames(): string[];
private static readonly _serializedATNSegments;
private static readonly _serializedATNSegment0;
private static readonly _serializedATNSegment1;
static readonly _serializedATN: string;
static __ATN: ATN;
static readonly _serializedATN: number[];
private static __ATN;
static get _ATN(): ATN;
static DecisionsToDFA: DFA[];
}

@@ -1,31 +0,19 @@

// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT
import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer.js";
import { Lexer } from "antlr4ts/Lexer.js";
import { LexerATNSimulator } from "antlr4ts/atn/LexerATNSimulator.js";
import { VocabularyImpl } from "antlr4ts/VocabularyImpl.js";
import * as Utils from "antlr4ts/misc/Utils.js";
export class CashScriptLexer extends Lexer {
// tslint:enable:no-trailing-whitespace
// Generated from src/grammar/CashScript.g4 by ANTLR 4.13.1
// noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
import { ATNDeserializer, DFA, Lexer, LexerATNSimulator, PredictionContextCache, Token } from "antlr4";
export default class CashScriptLexer extends Lexer {
constructor(input) {
super(input);
this._interp = new LexerATNSimulator(CashScriptLexer._ATN, this);
this._interp = new LexerATNSimulator(this, CashScriptLexer._ATN, CashScriptLexer.DecisionsToDFA, new PredictionContextCache());
}
// @Override
// @NotNull
get vocabulary() {
return CashScriptLexer.VOCABULARY;
}
// @Override
get grammarFileName() { return "CashScript.g4"; }
// @Override
get literalNames() { return CashScriptLexer.literalNames; }
get symbolicNames() { return CashScriptLexer.symbolicNames; }
get ruleNames() { return CashScriptLexer.ruleNames; }
// @Override
get serializedATN() { return CashScriptLexer._serializedATN; }
// @Override
get channelNames() { return CashScriptLexer.channelNames; }
// @Override
get modeNames() { return CashScriptLexer.modeNames; }
static get _ATN() {
if (!CashScriptLexer.__ATN) {
CashScriptLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(CashScriptLexer._serializedATN));
CashScriptLexer.__ATN = new ATNDeserializer().deserialize(CashScriptLexer._serializedATN);
}

@@ -107,10 +95,85 @@ return CashScriptLexer.__ATN;

CashScriptLexer.LINE_COMMENT = 72;
// tslint:disable:no-trailing-whitespace
CashScriptLexer.channelNames = [
"DEFAULT_TOKEN_CHANNEL", "HIDDEN",
];
// tslint:disable:no-trailing-whitespace
CashScriptLexer.modeNames = [
"DEFAULT_MODE",
];
CashScriptLexer.EOF = Token.EOF;
CashScriptLexer.channelNames = ["DEFAULT_TOKEN_CHANNEL", "HIDDEN"];
CashScriptLexer.literalNames = [null, "'pragma'",
"';'", "'cashscript'",
"'^'", "'~'",
"'>='", "'>'",
"'<'", "'<='",
"'='", "'contract'",
"'{'", "'}'",
"'function'",
"'('", "','",
"')'", "'require'",
"'if'", "'else'",
"'console.log'",
"'new'", "'['",
"']'", "'tx.outputs'",
"'.value'",
"'.lockingBytecode'",
"'.tokenCategory'",
"'.nftCommitment'",
"'.tokenAmount'",
"'tx.inputs'",
"'.outpointTransactionHash'",
"'.outpointIndex'",
"'.unlockingBytecode'",
"'.sequenceNumber'",
"'.reverse()'",
"'.length'",
"'.split'",
"'!'", "'-'",
"'*'", "'/'",
"'%'", "'+'",
"'=='", "'!='",
"'&'", "'|'",
"'&&'", "'||'",
"'constant'",
"'int'", "'bool'",
"'string'",
"'pubkey'",
"'sig'", "'datasig'"];
CashScriptLexer.symbolicNames = [null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
null, null,
"VersionLiteral",
"BooleanLiteral",
"NumberUnit",
"NumberLiteral",
"Bytes", "Bound",
"StringLiteral",
"DateLiteral",
"HexLiteral",
"TxVar", "NullaryOp",
"Identifier",
"WHITESPACE",
"COMMENT",
"LINE_COMMENT"];
CashScriptLexer.modeNames = ["DEFAULT_MODE",];
CashScriptLexer.ruleNames = [

@@ -128,411 +191,272 @@ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",

];
CashScriptLexer._LITERAL_NAMES = [
undefined, "'pragma'", "';'", "'cashscript'", "'^'", "'~'", "'>='", "'>'",
"'<'", "'<='", "'='", "'contract'", "'{'", "'}'", "'function'", "'('",
"','", "')'", "'require'", "'if'", "'else'", "'console.log'", "'new'",
"'['", "']'", "'tx.outputs'", "'.value'", "'.lockingBytecode'", "'.tokenCategory'",
"'.nftCommitment'", "'.tokenAmount'", "'tx.inputs'", "'.outpointTransactionHash'",
"'.outpointIndex'", "'.unlockingBytecode'", "'.sequenceNumber'", "'.reverse()'",
"'.length'", "'.split'", "'!'", "'-'", "'*'", "'/'", "'%'", "'+'", "'=='",
"'!='", "'&'", "'|'", "'&&'", "'||'", "'constant'", "'int'", "'bool'",
"'string'", "'pubkey'", "'sig'", "'datasig'",
];
CashScriptLexer._SYMBOLIC_NAMES = [
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined,
undefined, undefined, "VersionLiteral", "BooleanLiteral", "NumberUnit",
"NumberLiteral", "Bytes", "Bound", "StringLiteral", "DateLiteral", "HexLiteral",
"TxVar", "NullaryOp", "Identifier", "WHITESPACE", "COMMENT", "LINE_COMMENT",
];
CashScriptLexer.VOCABULARY = new VocabularyImpl(CashScriptLexer._LITERAL_NAMES, CashScriptLexer._SYMBOLIC_NAMES, []);
CashScriptLexer._serializedATNSegments = 2;
CashScriptLexer._serializedATNSegment0 = "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02J\u0336\b\x01" +
"\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06" +
"\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r" +
"\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t" +
"\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t" +
"\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C\t" +
"\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"\t" +
"\"\x04#\t#\x04$\t$\x04%\t%\x04&\t&\x04\'\t\'\x04(\t(\x04)\t)\x04*\t*\x04" +
"+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x043\t3\x04" +
"4\t4\x045\t5\x046\t6\x047\t7\x048\t8\x049\t9\x04:\t:\x04;\t;\x04<\t<\x04" +
"=\t=\x04>\t>\x04?\t?\x04@\t@\x04A\tA\x04B\tB\x04C\tC\x04D\tD\x04E\tE\x04" +
"F\tF\x04G\tG\x04H\tH\x04I\tI\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03" +
"\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03" +
"\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x05\x03\x05\x03\x06\x03" +
"\x06\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\t\x03\t\x03\n\x03\n\x03\n" +
"\x03\v\x03\v\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03" +
"\r\x03\r\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F" +
"\x03\x0F\x03\x0F\x03\x0F\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12\x03\x12" +
"\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x14" +
"\x03\x14\x03\x14\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x16\x03\x16" +
"\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16" +
"\x03\x16\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03\x18\x03\x19\x03\x19" +
"\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A" +
"\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B" +
"\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C" +
"\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1D" +
"\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D" +
"\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E\x03\x1E\x03\x1E\x03\x1E" +
"\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E" +
"\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F" +
"\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03 \x03 \x03 \x03 \x03" +
" \x03 \x03 \x03 \x03 \x03 \x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03" +
"!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03" +
"!\x03!\x03!\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03" +
"\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03" +
"#\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03$\x03$\x03" +
"$\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03" +
"%\x03%\x03%\x03%\x03%\x03%\x03%\x03%\x03%\x03%\x03%\x03&\x03&\x03&\x03" +
"&\x03&\x03&\x03&\x03&\x03\'\x03\'\x03\'\x03\'\x03\'\x03\'\x03\'\x03(\x03" +
"(\x03)\x03)\x03*\x03*\x03+\x03+\x03,\x03,\x03-\x03-\x03.\x03.\x03.\x03" +
"/\x03/\x03/\x030\x030\x031\x031\x032\x032\x032\x033\x033\x033\x034\x03" +
"4\x034\x034\x034\x034\x034\x034\x034\x035\x035\x035\x035\x036\x036\x03" +
"6\x036\x036\x037\x037\x037\x037\x037\x037\x037\x038\x038\x038\x038\x03" +
"8\x038\x038\x039\x039\x039\x039\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03" +
":\x03;\x06;\u01FE\n;\r;\x0E;\u01FF\x03;\x03;\x06;\u0204\n;\r;\x0E;\u0205" +
"\x03;\x03;\x06;\u020A\n;\r;\x0E;\u020B\x03<\x03<\x03<\x03<\x03<\x03<\x03" +
"<\x03<\x03<\x05<\u0217\n<\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03" +
"=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03" +
"=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03" +
"=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03=\x03" +
"=\x03=\x03=\x03=\x03=\x03=\x03=\x05=\u0252\n=\x03>\x05>\u0255\n>\x03>" +
"\x06>\u0258\n>\r>\x0E>\u0259\x03>\x03>\x06>\u025E\n>\r>\x0E>\u025F\x05" +
">\u0262\n>\x03?\x03?\x03?\x03?\x03?\x03?\x03?\x05?\u026B\n?\x03?\x03?" +
"\x03?\x03?\x05?\u0271\n?\x03@\x03@\x07@\u0275\n@\f@\x0E@\u0278\v@\x03" +
"A\x03A\x03A\x03A\x07A\u027E\nA\fA\x0EA\u0281\vA\x03A\x03A\x03A\x03A\x03" +
"A\x07A\u0288\nA\fA\x0EA\u028B\vA\x03A\x05A\u028E\nA\x03B\x03B\x03B\x03" +
"B\x03B\x03B\x03B\x03B\x03B\x03C\x03C\x03C\x07C\u029C\nC\fC\x0EC\u029F" +
"\vC\x03D\x03D\x03D\x03D\x03D\x03D\x03D\x03D\x03D\x03D\x03D\x03D\x03D\x05" +
"D\u02AE\nD\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03" +
"E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03" +
"E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03" +
"E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03" +
"E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03" +
"E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03" +
"E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x05E\u030E" +
"\nE\x03F\x03F\x07F\u0312\nF\fF\x0EF\u0315\vF\x03G\x06G\u0318\nG\rG\x0E" +
"G\u0319\x03G\x03G\x03H\x03H\x03H\x03H\x07H\u0322\nH\fH\x0EH\u0325\vH\x03" +
"H\x03H\x03H\x03H\x03H\x03I\x03I\x03I\x03I\x07I\u0330\nI\fI\x0EI\u0333" +
"\vI\x03I\x03I\x05\u027F\u0289\u0323\x02\x02J\x03\x02\x03\x05\x02\x04\x07" +
"\x02\x05\t\x02\x06\v\x02\x07\r\x02\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15" +
"\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02\x0F\x1D\x02\x10\x1F\x02\x11!\x02" +
"\x12#\x02\x13%\x02\x14\'\x02\x15)\x02\x16+\x02\x17-\x02\x18/\x02\x191" +
"\x02\x1A3\x02\x1B5\x02\x1C7\x02\x1D9\x02\x1E;\x02\x1F=\x02 ?\x02!A\x02" +
"\"C\x02#E\x02$G\x02%I\x02&K\x02\'M\x02(O\x02)Q\x02*S\x02+U\x02,W\x02-" +
"Y\x02.[\x02/]\x020_\x021a\x022c\x023e\x024g\x025i\x026k\x027m\x028o\x02" +
"9q\x02:s\x02;u\x02<w\x02=y\x02>{\x02?}\x02@\x7F\x02A\x81\x02B\x83\x02" +
"C\x85\x02D\x87\x02E\x89\x02F\x8B\x02G\x8D\x02H\x8F\x02I\x91\x02J\x03\x02" +
"\x0E\x03\x022;\x03\x02//\x04\x02GGgg\x03\x023;\x05\x02\f\f\x0F\x0F$$\x05" +
"\x02\f\f\x0F\x0F))\x04\x02ZZzz\x05\x022;CHch\x04\x02C\\c|\x06\x022;C\\" +
"aac|\x05\x02\v\f\x0E\x0F\"\"\x04\x02\f\f\x0F\x0F\x02\u0359\x02\x03\x03" +
"\x02\x02\x02\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03" +
"\x02\x02\x02\x02\v\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02" +
"\x02\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02" +
"\x02\x02\x02\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02" +
"\x02\x02\x02\x1D\x03\x02\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02" +
"\x02\x02\x02#\x03\x02\x02\x02\x02%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02" +
"\x02)\x03\x02\x02\x02\x02+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03" +
"\x02\x02\x02\x021\x03\x02\x02\x02\x023\x03\x02\x02\x02\x025\x03\x02\x02" +
"\x02\x027\x03\x02\x02\x02\x029\x03\x02\x02\x02\x02;\x03\x02\x02\x02\x02" +
"=\x03\x02\x02\x02\x02?\x03\x02\x02\x02\x02A\x03\x02\x02\x02\x02C\x03\x02" +
"\x02\x02\x02E\x03\x02\x02\x02\x02G\x03\x02\x02\x02\x02I\x03\x02\x02\x02" +
"\x02K\x03\x02\x02\x02\x02M\x03\x02\x02\x02\x02O\x03\x02\x02\x02\x02Q\x03" +
"\x02\x02\x02\x02S\x03\x02\x02\x02\x02U\x03\x02\x02\x02\x02W\x03\x02\x02" +
"\x02\x02Y\x03\x02\x02\x02\x02[\x03\x02\x02\x02\x02]\x03\x02\x02\x02\x02" +
"_\x03\x02\x02\x02\x02a\x03\x02\x02\x02\x02c\x03\x02\x02\x02\x02e\x03\x02" +
"\x02\x02\x02g\x03\x02\x02\x02\x02i\x03\x02\x02\x02\x02k\x03\x02\x02\x02" +
"\x02m\x03\x02\x02\x02\x02o\x03\x02\x02\x02\x02q\x03\x02\x02\x02\x02s\x03" +
"\x02\x02\x02\x02u\x03\x02\x02\x02\x02w\x03\x02\x02\x02\x02y\x03\x02\x02" +
"\x02\x02{\x03\x02\x02\x02\x02}\x03\x02\x02\x02\x02\x7F\x03\x02\x02\x02" +
"\x02\x81\x03\x02\x02\x02\x02\x83\x03\x02\x02\x02\x02\x85\x03\x02\x02\x02" +
"\x02\x87\x03\x02\x02\x02\x02\x89\x03\x02\x02\x02\x02\x8B\x03\x02\x02\x02" +
"\x02\x8D\x03\x02\x02\x02\x02\x8F\x03\x02\x02\x02\x02\x91\x03\x02\x02\x02" +
"\x03\x93\x03\x02\x02\x02\x05\x9A\x03\x02\x02\x02\x07\x9C\x03\x02\x02\x02" +
"\t\xA7\x03\x02\x02\x02\v\xA9\x03\x02\x02\x02\r\xAB\x03\x02\x02\x02\x0F" +
"\xAE\x03\x02\x02\x02\x11\xB0\x03\x02\x02\x02\x13\xB2\x03\x02\x02\x02\x15" +
"\xB5\x03\x02\x02\x02\x17\xB7\x03\x02\x02\x02\x19\xC0\x03\x02\x02\x02\x1B" +
"\xC2\x03\x02\x02\x02\x1D\xC4\x03\x02\x02\x02\x1F\xCD\x03\x02\x02\x02!" +
"\xCF\x03\x02\x02\x02#\xD1\x03\x02\x02\x02%\xD3\x03\x02\x02\x02\'\xDB\x03" +
"\x02\x02\x02)\xDE\x03\x02\x02\x02+\xE3\x03\x02\x02\x02-\xEF\x03\x02\x02" +
"\x02/\xF3\x03\x02\x02\x021\xF5\x03\x02\x02\x023\xF7\x03\x02\x02\x025\u0102" +
"\x03\x02\x02\x027\u0109\x03\x02\x02\x029\u011A\x03\x02\x02\x02;\u0129" +
"\x03\x02\x02\x02=\u0138\x03\x02\x02\x02?\u0145\x03\x02\x02\x02A\u014F" +
"\x03\x02\x02\x02C\u0168\x03\x02\x02\x02E\u0177\x03\x02\x02\x02G\u018A" +
"\x03\x02\x02\x02I\u019A\x03\x02\x02\x02K\u01A5\x03\x02\x02\x02M\u01AD" +
"\x03\x02\x02\x02O\u01B4\x03\x02\x02\x02Q\u01B6\x03\x02\x02\x02S\u01B8" +
"\x03\x02\x02\x02U\u01BA\x03\x02\x02\x02W\u01BC\x03\x02\x02\x02Y\u01BE" +
"\x03\x02\x02\x02[\u01C0\x03\x02\x02\x02]\u01C3\x03\x02\x02\x02_\u01C6" +
"\x03\x02\x02\x02a\u01C8\x03\x02\x02\x02c\u01CA\x03\x02\x02\x02e\u01CD" +
"\x03\x02\x02\x02g\u01D0\x03\x02\x02\x02i\u01D9\x03\x02\x02\x02k\u01DD" +
"\x03\x02\x02\x02m\u01E2\x03\x02\x02\x02o\u01E9\x03\x02\x02\x02q\u01F0" +
"\x03\x02\x02\x02s\u01F4\x03\x02\x02\x02u\u01FD\x03\x02\x02\x02w\u0216" +
"\x03\x02\x02\x02y\u0251\x03\x02\x02\x02{\u0254\x03\x02\x02\x02}\u0270" +
"\x03\x02\x02\x02\x7F\u0272\x03\x02\x02\x02\x81\u028D\x03\x02\x02\x02\x83" +
"\u028F\x03\x02\x02\x02\x85\u0298\x03\x02\x02\x02\x87\u02AD\x03\x02\x02" +
"\x02\x89\u030D\x03\x02\x02\x02\x8B\u030F\x03\x02\x02\x02\x8D\u0317\x03" +
"\x02\x02\x02\x8F\u031D\x03\x02\x02\x02\x91\u032B\x03\x02\x02\x02\x93\x94" +
"\x07r\x02\x02\x94\x95\x07t\x02\x02\x95\x96\x07c\x02\x02\x96\x97\x07i\x02" +
"\x02\x97\x98\x07o\x02\x02\x98\x99\x07c\x02\x02\x99\x04\x03\x02\x02\x02" +
"\x9A\x9B\x07=\x02\x02\x9B\x06\x03\x02\x02\x02\x9C\x9D\x07e\x02\x02\x9D" +
"\x9E\x07c\x02\x02\x9E\x9F\x07u\x02\x02\x9F\xA0\x07j\x02\x02\xA0\xA1\x07" +
"u\x02\x02\xA1\xA2\x07e\x02\x02\xA2\xA3\x07t\x02\x02\xA3\xA4\x07k\x02\x02" +
"\xA4\xA5\x07r\x02\x02\xA5\xA6\x07v\x02\x02\xA6\b\x03\x02\x02\x02\xA7\xA8" +
"\x07`\x02\x02\xA8\n\x03\x02\x02\x02\xA9\xAA\x07\x80\x02\x02\xAA\f\x03" +
"\x02\x02\x02\xAB\xAC\x07@\x02\x02\xAC\xAD\x07?\x02\x02\xAD\x0E\x03\x02" +
"\x02\x02\xAE\xAF\x07@\x02\x02\xAF\x10\x03\x02\x02\x02\xB0\xB1\x07>\x02" +
"\x02\xB1\x12\x03\x02\x02\x02\xB2\xB3\x07>\x02\x02\xB3\xB4\x07?\x02\x02" +
"\xB4\x14\x03\x02\x02\x02\xB5\xB6\x07?\x02\x02\xB6\x16\x03\x02\x02\x02" +
"\xB7\xB8\x07e\x02\x02\xB8\xB9\x07q\x02\x02\xB9\xBA\x07p\x02\x02\xBA\xBB" +
"\x07v\x02\x02\xBB\xBC\x07t\x02\x02\xBC\xBD\x07c\x02\x02\xBD\xBE\x07e\x02" +
"\x02\xBE\xBF\x07v\x02\x02\xBF\x18\x03\x02\x02\x02\xC0\xC1\x07}\x02\x02" +
"\xC1\x1A\x03\x02\x02\x02\xC2\xC3\x07\x7F\x02\x02\xC3\x1C\x03\x02\x02\x02" +
"\xC4\xC5\x07h\x02\x02\xC5\xC6\x07w\x02\x02\xC6\xC7\x07p\x02\x02\xC7\xC8" +
"\x07e\x02\x02\xC8\xC9\x07v\x02\x02\xC9\xCA\x07k\x02\x02\xCA\xCB\x07q\x02" +
"\x02\xCB\xCC\x07p\x02\x02\xCC\x1E\x03\x02\x02\x02\xCD\xCE\x07*\x02\x02" +
"\xCE \x03\x02\x02\x02\xCF\xD0\x07.\x02\x02\xD0\"\x03\x02\x02\x02\xD1\xD2" +
"\x07+\x02\x02\xD2$\x03\x02\x02\x02\xD3\xD4\x07t\x02\x02\xD4\xD5\x07g\x02" +
"\x02\xD5\xD6\x07s\x02\x02\xD6\xD7\x07w\x02\x02\xD7\xD8\x07k\x02\x02\xD8" +
"\xD9\x07t\x02\x02\xD9\xDA\x07g\x02\x02\xDA&\x03\x02\x02\x02\xDB\xDC\x07" +
"k\x02\x02\xDC\xDD\x07h\x02\x02\xDD(\x03\x02\x02\x02\xDE\xDF\x07g\x02\x02" +
"\xDF\xE0\x07n\x02\x02\xE0\xE1\x07u\x02\x02\xE1\xE2\x07g\x02\x02\xE2*\x03" +
"\x02\x02\x02\xE3\xE4\x07e\x02\x02\xE4\xE5\x07q\x02\x02\xE5\xE6\x07p\x02" +
"\x02\xE6\xE7\x07u\x02\x02\xE7\xE8\x07q\x02\x02\xE8\xE9\x07n\x02\x02\xE9" +
"\xEA\x07g\x02\x02\xEA\xEB\x070\x02\x02\xEB\xEC\x07n\x02\x02\xEC\xED\x07" +
"q\x02\x02\xED\xEE\x07i\x02\x02\xEE,\x03\x02\x02\x02\xEF\xF0\x07p\x02\x02" +
"\xF0\xF1\x07g\x02\x02\xF1\xF2\x07y\x02\x02\xF2.\x03\x02\x02\x02\xF3\xF4" +
"\x07]\x02\x02\xF40\x03\x02\x02\x02\xF5\xF6\x07_\x02\x02\xF62\x03\x02\x02" +
"\x02\xF7\xF8\x07v\x02\x02\xF8\xF9\x07z\x02\x02\xF9\xFA\x070\x02\x02\xFA" +
"\xFB\x07q\x02\x02\xFB\xFC\x07w\x02\x02\xFC\xFD\x07v\x02\x02\xFD\xFE\x07" +
"r\x02\x02\xFE\xFF\x07w\x02\x02\xFF\u0100\x07v\x02\x02\u0100\u0101\x07" +
"u\x02\x02\u01014\x03\x02\x02\x02\u0102\u0103\x070\x02\x02\u0103\u0104" +
"\x07x\x02\x02\u0104\u0105\x07c\x02\x02\u0105\u0106\x07n\x02\x02\u0106" +
"\u0107\x07w\x02\x02\u0107\u0108\x07g\x02\x02\u01086\x03\x02\x02\x02\u0109" +
"\u010A\x070\x02\x02\u010A\u010B\x07n\x02\x02\u010B\u010C\x07q\x02\x02" +
"\u010C\u010D\x07e\x02\x02\u010D\u010E\x07m\x02\x02\u010E\u010F\x07k\x02" +
"\x02\u010F\u0110\x07p\x02\x02\u0110\u0111\x07i\x02\x02\u0111\u0112\x07" +
"D\x02\x02\u0112\u0113\x07{\x02\x02\u0113\u0114\x07v\x02\x02\u0114\u0115" +
"\x07g\x02\x02\u0115\u0116\x07e\x02\x02\u0116\u0117\x07q\x02\x02\u0117" +
"\u0118\x07f\x02\x02\u0118\u0119\x07g\x02\x02\u01198\x03\x02\x02\x02\u011A" +
"\u011B\x070\x02\x02\u011B\u011C\x07v\x02\x02\u011C\u011D\x07q\x02\x02" +
"\u011D\u011E\x07m\x02\x02\u011E\u011F\x07g\x02\x02\u011F\u0120\x07p\x02" +
"\x02\u0120\u0121\x07E\x02\x02\u0121\u0122\x07c\x02\x02\u0122\u0123\x07" +
"v\x02\x02\u0123\u0124\x07g\x02\x02\u0124\u0125\x07i\x02\x02\u0125\u0126" +
"\x07q\x02\x02\u0126\u0127\x07t\x02\x02\u0127\u0128\x07{\x02\x02\u0128" +
":\x03\x02\x02\x02\u0129\u012A\x070\x02\x02\u012A\u012B\x07p\x02\x02\u012B" +
"\u012C\x07h\x02\x02\u012C\u012D\x07v\x02\x02\u012D\u012E\x07E\x02\x02" +
"\u012E\u012F\x07q\x02\x02\u012F\u0130\x07o\x02\x02\u0130\u0131\x07o\x02" +
"\x02\u0131\u0132\x07k\x02\x02\u0132\u0133\x07v\x02\x02\u0133\u0134\x07" +
"o\x02\x02\u0134\u0135\x07g\x02\x02\u0135\u0136\x07p\x02\x02\u0136\u0137" +
"\x07v\x02\x02\u0137<\x03\x02\x02\x02\u0138\u0139\x070\x02\x02\u0139\u013A" +
"\x07v\x02\x02\u013A\u013B\x07q\x02\x02\u013B\u013C\x07m\x02\x02\u013C" +
"\u013D\x07g\x02\x02\u013D\u013E\x07p\x02\x02\u013E\u013F\x07C\x02\x02" +
"\u013F\u0140\x07o\x02\x02\u0140\u0141\x07q\x02\x02\u0141\u0142\x07w\x02" +
"\x02\u0142\u0143\x07p\x02\x02\u0143\u0144\x07v\x02\x02\u0144>\x03\x02" +
"\x02\x02\u0145\u0146\x07v\x02\x02\u0146\u0147\x07z\x02\x02\u0147\u0148" +
"\x070\x02\x02\u0148\u0149\x07k\x02\x02\u0149\u014A\x07p\x02\x02\u014A" +
"\u014B\x07r\x02\x02\u014B\u014C\x07w\x02\x02\u014C\u014D\x07v\x02\x02" +
"\u014D\u014E\x07u\x02\x02\u014E@\x03\x02\x02\x02\u014F\u0150\x070\x02" +
"\x02\u0150\u0151\x07q\x02\x02\u0151\u0152\x07w\x02\x02\u0152\u0153\x07" +
"v\x02\x02\u0153\u0154\x07r\x02\x02\u0154\u0155\x07q\x02\x02\u0155\u0156" +
"\x07k\x02\x02\u0156\u0157\x07p\x02\x02\u0157\u0158\x07v\x02\x02\u0158" +
"\u0159\x07V\x02\x02\u0159\u015A\x07t\x02\x02\u015A\u015B\x07c\x02\x02" +
"\u015B\u015C\x07p\x02\x02\u015C\u015D\x07u\x02\x02\u015D\u015E\x07c\x02" +
"\x02\u015E\u015F\x07e\x02\x02\u015F\u0160\x07v\x02\x02\u0160\u0161\x07" +
"k\x02\x02\u0161\u0162\x07q\x02\x02\u0162\u0163\x07p\x02\x02\u0163\u0164" +
"\x07J\x02\x02\u0164\u0165\x07c\x02\x02\u0165\u0166\x07u\x02\x02\u0166" +
"\u0167\x07j\x02\x02\u0167B\x03\x02\x02\x02\u0168\u0169\x070\x02\x02\u0169" +
"\u016A\x07q\x02\x02\u016A\u016B\x07w\x02\x02\u016B\u016C\x07v\x02\x02" +
"\u016C\u016D\x07r\x02\x02\u016D\u016E\x07q\x02\x02\u016E\u016F\x07k\x02" +
"\x02\u016F\u0170\x07p\x02\x02\u0170\u0171\x07v\x02\x02\u0171\u0172\x07" +
"K\x02\x02\u0172\u0173\x07p\x02\x02\u0173\u0174\x07f\x02\x02\u0174\u0175" +
"\x07g\x02\x02\u0175\u0176\x07z\x02\x02\u0176D\x03\x02\x02\x02\u0177\u0178" +
"\x070\x02\x02\u0178\u0179\x07w\x02\x02\u0179\u017A\x07p\x02\x02\u017A" +
"\u017B\x07n\x02\x02\u017B\u017C\x07q\x02\x02\u017C\u017D\x07e\x02\x02" +
"\u017D\u017E\x07m\x02\x02\u017E\u017F\x07k\x02\x02\u017F\u0180\x07p\x02" +
"\x02\u0180\u0181\x07i\x02\x02\u0181\u0182\x07D\x02\x02\u0182\u0183\x07" +
"{\x02\x02\u0183\u0184\x07v\x02\x02\u0184\u0185\x07g\x02\x02\u0185\u0186" +
"\x07e\x02\x02\u0186\u0187\x07q\x02\x02\u0187\u0188\x07f\x02\x02\u0188" +
"\u0189\x07g\x02\x02\u0189F\x03\x02\x02\x02\u018A\u018B\x070\x02\x02\u018B" +
"\u018C\x07u\x02\x02\u018C\u018D\x07g\x02\x02\u018D\u018E\x07s\x02\x02" +
"\u018E\u018F\x07w\x02\x02\u018F\u0190\x07g\x02\x02\u0190\u0191\x07p\x02" +
"\x02\u0191\u0192\x07e\x02\x02\u0192\u0193\x07g\x02\x02\u0193\u0194\x07" +
"P\x02\x02\u0194\u0195\x07w\x02\x02\u0195\u0196\x07o\x02\x02\u0196\u0197" +
"\x07d\x02\x02\u0197\u0198\x07g\x02\x02\u0198\u0199\x07t\x02\x02\u0199" +
"H\x03\x02\x02\x02\u019A\u019B\x070\x02\x02\u019B\u019C\x07t\x02\x02\u019C" +
"\u019D\x07g\x02\x02\u019D\u019E\x07x\x02\x02\u019E\u019F\x07g\x02\x02" +
"\u019F\u01A0\x07t\x02\x02\u01A0\u01A1\x07u\x02\x02\u01A1\u01A2\x07g\x02" +
"\x02\u01A2\u01A3\x07*\x02\x02\u01A3\u01A4\x07+\x02\x02\u01A4J\x03\x02" +
"\x02\x02\u01A5\u01A6\x070\x02\x02\u01A6\u01A7\x07n\x02\x02\u01A7\u01A8" +
"\x07g\x02\x02\u01A8\u01A9\x07p\x02\x02\u01A9\u01AA\x07i\x02\x02\u01AA" +
"\u01AB\x07v\x02\x02\u01AB\u01AC\x07j\x02\x02\u01ACL\x03\x02\x02\x02\u01AD" +
"\u01AE\x070\x02\x02\u01AE\u01AF\x07u\x02\x02\u01AF\u01B0\x07r\x02\x02" +
"\u01B0\u01B1\x07n\x02\x02\u01B1\u01B2\x07k\x02\x02\u01B2\u01B3\x07v\x02" +
"\x02\u01B3N\x03\x02\x02\x02\u01B4\u01B5\x07#\x02\x02\u01B5P\x03\x02\x02" +
"\x02\u01B6\u01B7\x07/\x02\x02\u01B7R\x03\x02\x02\x02\u01B8\u01B9\x07," +
"\x02\x02\u01B9T\x03\x02\x02\x02\u01BA\u01BB\x071\x02\x02\u01BBV\x03\x02" +
"\x02\x02\u01BC\u01BD\x07\'\x02\x02\u01BDX\x03\x02\x02\x02\u01BE\u01BF" +
"\x07-\x02\x02\u01BFZ\x03\x02\x02\x02\u01C0\u01C1\x07?\x02\x02\u01C1\u01C2" +
"\x07?\x02\x02\u01C2\\\x03\x02\x02\x02\u01C3\u01C4\x07#\x02\x02\u01C4\u01C5" +
"\x07?\x02\x02\u01C5^\x03\x02\x02\x02\u01C6\u01C7\x07(\x02\x02\u01C7`\x03" +
"\x02\x02\x02\u01C8\u01C9\x07~\x02\x02\u01C9b\x03\x02\x02\x02\u01CA\u01CB" +
"\x07(\x02\x02\u01CB\u01CC\x07(\x02\x02\u01CCd\x03\x02\x02\x02\u01CD\u01CE" +
"\x07~\x02\x02\u01CE\u01CF\x07~\x02\x02\u01CFf\x03\x02\x02\x02\u01D0\u01D1" +
"\x07e\x02\x02\u01D1\u01D2\x07q\x02\x02\u01D2\u01D3\x07p\x02\x02\u01D3" +
"\u01D4\x07u\x02\x02\u01D4\u01D5\x07v\x02\x02\u01D5\u01D6\x07c\x02\x02" +
"\u01D6\u01D7\x07p\x02\x02\u01D7\u01D8\x07v\x02\x02\u01D8h\x03\x02\x02" +
"\x02\u01D9\u01DA\x07k\x02\x02\u01DA\u01DB\x07p\x02\x02\u01DB\u01DC\x07" +
"v\x02\x02\u01DCj\x03\x02\x02\x02\u01DD\u01DE\x07d\x02\x02\u01DE\u01DF" +
"\x07q\x02\x02\u01DF\u01E0\x07q\x02\x02\u01E0\u01E1\x07n\x02\x02\u01E1" +
"l\x03\x02\x02\x02\u01E2\u01E3\x07u\x02\x02\u01E3\u01E4\x07v\x02\x02\u01E4" +
"\u01E5\x07t\x02\x02\u01E5\u01E6\x07k\x02\x02\u01E6\u01E7\x07p\x02\x02" +
"\u01E7\u01E8\x07i\x02\x02\u01E8n\x03\x02\x02\x02\u01E9\u01EA\x07r\x02" +
"\x02\u01EA\u01EB\x07w\x02\x02\u01EB\u01EC\x07d\x02\x02\u01EC\u01ED\x07" +
"m\x02\x02\u01ED\u01EE\x07g\x02\x02\u01EE\u01EF\x07{\x02\x02\u01EFp\x03" +
"\x02\x02\x02\u01F0\u01F1\x07u\x02\x02\u01F1\u01F2\x07k\x02\x02\u01F2\u01F3" +
"\x07i\x02\x02\u01F3r\x03\x02\x02\x02\u01F4\u01F5\x07f\x02\x02\u01F5\u01F6" +
"\x07c\x02\x02\u01F6\u01F7\x07v\x02\x02\u01F7\u01F8\x07c\x02\x02\u01F8";
CashScriptLexer._serializedATNSegment1 = "\u01F9\x07u\x02\x02\u01F9\u01FA\x07k\x02\x02\u01FA\u01FB\x07i\x02\x02" +
"\u01FBt\x03\x02\x02\x02\u01FC\u01FE\t\x02\x02\x02\u01FD\u01FC\x03\x02" +
"\x02\x02\u01FE\u01FF\x03\x02\x02\x02\u01FF\u01FD\x03\x02\x02\x02\u01FF" +
"\u0200\x03\x02\x02\x02\u0200\u0201\x03\x02\x02\x02\u0201\u0203\x070\x02" +
"\x02\u0202\u0204\t\x02\x02\x02\u0203\u0202\x03\x02\x02\x02\u0204\u0205" +
"\x03\x02\x02\x02\u0205\u0203\x03\x02\x02\x02\u0205\u0206\x03\x02\x02\x02" +
"\u0206\u0207\x03\x02\x02\x02\u0207\u0209\x070\x02\x02\u0208\u020A\t\x02" +
"\x02\x02\u0209\u0208\x03\x02\x02\x02\u020A\u020B\x03\x02\x02\x02\u020B" +
"\u0209\x03\x02\x02\x02\u020B\u020C\x03\x02\x02\x02\u020Cv\x03\x02\x02" +
"\x02\u020D\u020E\x07v\x02\x02\u020E\u020F\x07t\x02\x02\u020F\u0210\x07" +
"w\x02\x02\u0210\u0217\x07g\x02\x02\u0211\u0212\x07h\x02\x02\u0212\u0213" +
"\x07c\x02\x02\u0213\u0214\x07n\x02\x02\u0214\u0215\x07u\x02\x02\u0215" +
"\u0217\x07g\x02\x02\u0216\u020D\x03\x02\x02\x02\u0216\u0211\x03\x02\x02" +
"\x02\u0217x\x03\x02\x02\x02\u0218\u0219\x07u\x02\x02\u0219\u021A\x07c" +
"\x02\x02\u021A\u021B\x07v\x02\x02\u021B\u021C\x07q\x02\x02\u021C\u021D" +
"\x07u\x02\x02\u021D\u021E\x07j\x02\x02\u021E\u021F\x07k\x02\x02\u021F" +
"\u0252\x07u\x02\x02\u0220\u0221\x07u\x02\x02\u0221\u0222\x07c\x02\x02" +
"\u0222\u0223\x07v\x02\x02\u0223\u0252\x07u\x02\x02\u0224\u0225\x07h\x02" +
"\x02\u0225\u0226\x07k\x02\x02\u0226\u0227\x07p\x02\x02\u0227\u0228\x07" +
"p\x02\x02\u0228\u0229\x07g\x02\x02\u0229\u0252\x07{\x02\x02\u022A\u022B" +
"\x07d\x02\x02\u022B\u022C\x07k\x02\x02\u022C\u022D\x07v\x02\x02\u022D" +
"\u0252\x07u\x02\x02\u022E\u022F\x07d\x02\x02\u022F\u0230\x07k\x02\x02" +
"\u0230\u0231\x07v\x02\x02\u0231\u0232\x07e\x02\x02\u0232\u0233\x07q\x02" +
"\x02\u0233\u0234\x07k\x02\x02\u0234\u0252\x07p\x02\x02\u0235\u0236\x07" +
"u\x02\x02\u0236\u0237\x07g\x02\x02\u0237\u0238\x07e\x02\x02\u0238\u0239" +
"\x07q\x02\x02\u0239\u023A\x07p\x02\x02\u023A\u023B\x07f\x02\x02\u023B" +
"\u0252\x07u\x02\x02\u023C\u023D\x07o\x02\x02\u023D\u023E\x07k\x02\x02" +
"\u023E\u023F\x07p\x02\x02\u023F\u0240\x07w\x02\x02\u0240\u0241\x07v\x02" +
"\x02\u0241\u0242\x07g\x02\x02\u0242\u0252\x07u\x02\x02\u0243\u0244\x07" +
"j\x02\x02\u0244\u0245\x07q\x02\x02\u0245\u0246\x07w\x02\x02\u0246\u0247" +
"\x07t\x02\x02\u0247\u0252\x07u\x02\x02\u0248\u0249\x07f\x02\x02\u0249" +
"\u024A\x07c\x02\x02\u024A\u024B\x07{\x02\x02\u024B\u0252\x07u\x02\x02" +
"\u024C\u024D\x07y\x02\x02\u024D\u024E\x07g\x02\x02\u024E\u024F\x07g\x02" +
"\x02\u024F\u0250\x07m\x02\x02\u0250\u0252\x07u\x02\x02\u0251\u0218\x03" +
"\x02\x02\x02\u0251\u0220\x03\x02\x02\x02\u0251\u0224\x03\x02\x02\x02\u0251" +
"\u022A\x03\x02\x02\x02\u0251\u022E\x03\x02\x02\x02\u0251\u0235\x03\x02" +
"\x02\x02\u0251\u023C\x03\x02\x02\x02\u0251\u0243\x03\x02\x02\x02\u0251" +
"\u0248\x03\x02\x02\x02\u0251\u024C\x03\x02\x02\x02\u0252z\x03\x02\x02" +
"\x02\u0253\u0255\t\x03\x02\x02\u0254\u0253\x03\x02\x02\x02\u0254\u0255" +
"\x03\x02\x02\x02\u0255\u0257\x03\x02\x02\x02\u0256\u0258\t\x02\x02\x02" +
"\u0257\u0256\x03\x02\x02\x02\u0258\u0259\x03\x02\x02\x02\u0259\u0257\x03" +
"\x02\x02\x02\u0259\u025A\x03\x02\x02\x02\u025A\u0261\x03\x02\x02\x02\u025B" +
"\u025D\t\x04\x02\x02\u025C\u025E\t\x02\x02\x02\u025D\u025C\x03\x02\x02" +
"\x02\u025E\u025F\x03\x02\x02\x02\u025F\u025D\x03\x02\x02\x02\u025F\u0260" +
"\x03\x02\x02\x02\u0260\u0262\x03\x02\x02\x02\u0261\u025B\x03\x02\x02\x02" +
"\u0261\u0262\x03\x02\x02\x02\u0262|\x03\x02\x02\x02\u0263\u0264\x07d\x02" +
"\x02\u0264\u0265\x07{\x02\x02\u0265\u0266\x07v\x02\x02\u0266\u0267\x07" +
"g\x02\x02\u0267\u0268\x07u\x02\x02\u0268\u026A\x03\x02\x02\x02\u0269\u026B" +
"\x05\x7F@\x02\u026A\u0269\x03\x02\x02\x02\u026A\u026B\x03\x02\x02\x02" +
"\u026B\u0271\x03\x02\x02\x02\u026C\u026D\x07d\x02\x02\u026D\u026E\x07" +
"{\x02\x02\u026E\u026F\x07v\x02\x02\u026F\u0271\x07g\x02\x02\u0270\u0263" +
"\x03\x02\x02\x02\u0270\u026C\x03\x02\x02\x02\u0271~\x03\x02\x02\x02\u0272" +
"\u0276\t\x05\x02\x02\u0273\u0275\t\x02\x02\x02\u0274\u0273\x03\x02\x02" +
"\x02\u0275\u0278\x03\x02\x02\x02\u0276\u0274\x03\x02\x02\x02\u0276\u0277" +
"\x03\x02\x02\x02\u0277\x80\x03\x02\x02\x02\u0278\u0276\x03\x02\x02\x02" +
"\u0279\u027F\x07$\x02\x02\u027A\u027B\x07^\x02\x02\u027B\u027E\x07$\x02" +
"\x02\u027C\u027E\n\x06\x02\x02\u027D\u027A\x03\x02\x02\x02\u027D\u027C" +
"\x03\x02\x02\x02\u027E\u0281\x03\x02\x02\x02\u027F\u0280\x03\x02\x02\x02" +
"\u027F\u027D\x03\x02\x02\x02\u0280\u0282\x03\x02\x02\x02\u0281\u027F\x03" +
"\x02\x02\x02\u0282\u028E\x07$\x02\x02\u0283\u0289\x07)\x02\x02\u0284\u0285" +
"\x07^\x02\x02\u0285\u0288\x07)\x02\x02\u0286\u0288\n\x07\x02\x02\u0287" +
"\u0284\x03\x02\x02\x02\u0287\u0286\x03\x02\x02\x02\u0288\u028B\x03\x02" +
"\x02\x02\u0289\u028A\x03\x02\x02\x02\u0289\u0287\x03\x02\x02\x02\u028A" +
"\u028C\x03\x02\x02\x02\u028B\u0289\x03\x02\x02\x02\u028C\u028E\x07)\x02" +
"\x02\u028D\u0279\x03\x02\x02\x02\u028D\u0283\x03\x02\x02\x02\u028E\x82" +
"\x03\x02\x02\x02\u028F\u0290\x07f\x02\x02\u0290\u0291\x07c\x02\x02\u0291" +
"\u0292\x07v\x02\x02\u0292\u0293\x07g\x02\x02\u0293\u0294\x07*\x02\x02" +
"\u0294\u0295\x03\x02\x02\x02\u0295\u0296\x05\x81A\x02\u0296\u0297\x07" +
"+\x02\x02\u0297\x84\x03\x02\x02\x02\u0298\u0299\x072\x02\x02\u0299\u029D" +
"\t\b\x02\x02\u029A\u029C\t\t\x02\x02\u029B\u029A\x03\x02\x02\x02\u029C" +
"\u029F\x03\x02\x02\x02\u029D\u029B\x03\x02\x02\x02\u029D\u029E\x03\x02" +
"\x02\x02\u029E\x86\x03\x02\x02\x02\u029F\u029D\x03\x02\x02\x02\u02A0\u02A1" +
"\x07v\x02\x02\u02A1\u02A2\x07z\x02\x02\u02A2\u02A3\x070\x02\x02\u02A3" +
"\u02A4\x07c\x02\x02\u02A4\u02A5\x07i\x02\x02\u02A5\u02AE\x07g\x02\x02" +
"\u02A6\u02A7\x07v\x02\x02\u02A7\u02A8\x07z\x02\x02\u02A8\u02A9\x070\x02" +
"\x02\u02A9\u02AA\x07v\x02\x02\u02AA\u02AB\x07k\x02\x02\u02AB\u02AC\x07" +
"o\x02\x02\u02AC\u02AE\x07g\x02\x02\u02AD\u02A0\x03\x02\x02\x02\u02AD\u02A6" +
"\x03\x02\x02\x02\u02AE\x88\x03\x02\x02\x02\u02AF\u02B0\x07v\x02\x02\u02B0" +
"\u02B1\x07j\x02\x02\u02B1\u02B2\x07k\x02\x02\u02B2\u02B3\x07u\x02\x02" +
"\u02B3\u02B4\x070\x02\x02\u02B4\u02B5\x07c\x02\x02\u02B5\u02B6\x07e\x02" +
"\x02\u02B6\u02B7\x07v\x02\x02\u02B7\u02B8\x07k\x02\x02\u02B8\u02B9\x07" +
"x\x02\x02\u02B9\u02BA\x07g\x02\x02\u02BA\u02BB\x07K\x02\x02\u02BB\u02BC" +
"\x07p\x02\x02\u02BC\u02BD\x07r\x02\x02\u02BD\u02BE\x07w\x02\x02\u02BE" +
"\u02BF\x07v\x02\x02\u02BF\u02C0\x07K\x02\x02\u02C0\u02C1\x07p\x02\x02" +
"\u02C1\u02C2\x07f\x02\x02\u02C2\u02C3\x07g\x02\x02\u02C3\u030E\x07z\x02" +
"\x02\u02C4\u02C5\x07v\x02\x02\u02C5\u02C6\x07j\x02\x02\u02C6\u02C7\x07" +
"k\x02\x02\u02C7\u02C8\x07u\x02\x02\u02C8\u02C9\x070\x02\x02\u02C9\u02CA" +
"\x07c\x02\x02\u02CA\u02CB\x07e\x02\x02\u02CB\u02CC\x07v\x02\x02\u02CC" +
"\u02CD\x07k\x02\x02\u02CD\u02CE\x07x\x02\x02\u02CE\u02CF\x07g\x02\x02" +
"\u02CF\u02D0\x07D\x02\x02\u02D0\u02D1\x07{\x02\x02\u02D1\u02D2\x07v\x02" +
"\x02\u02D2\u02D3\x07g\x02\x02\u02D3\u02D4\x07e\x02\x02\u02D4\u02D5\x07" +
"q\x02\x02\u02D5\u02D6\x07f\x02\x02\u02D6\u030E\x07g\x02\x02\u02D7\u02D8" +
"\x07v\x02\x02\u02D8\u02D9\x07z\x02\x02\u02D9\u02DA\x070\x02\x02\u02DA" +
"\u02DB\x07k\x02\x02\u02DB\u02DC\x07p\x02\x02\u02DC\u02DD\x07r\x02\x02" +
"\u02DD\u02DE\x07w\x02\x02\u02DE\u02DF\x07v\x02\x02\u02DF\u02E0\x07u\x02" +
"\x02\u02E0\u02E1\x070\x02\x02\u02E1\u02E2\x07n\x02\x02\u02E2\u02E3\x07" +
"g\x02\x02\u02E3\u02E4\x07p\x02\x02\u02E4\u02E5\x07i\x02\x02\u02E5\u02E6" +
"\x07v\x02\x02\u02E6\u030E\x07j\x02\x02\u02E7\u02E8\x07v\x02\x02\u02E8" +
"\u02E9\x07z\x02\x02\u02E9\u02EA\x070\x02\x02\u02EA\u02EB\x07q\x02\x02" +
"\u02EB\u02EC\x07w\x02\x02\u02EC\u02ED\x07v\x02\x02\u02ED\u02EE\x07r\x02" +
"\x02\u02EE\u02EF\x07w\x02\x02\u02EF\u02F0\x07v\x02\x02\u02F0\u02F1\x07" +
"u\x02\x02\u02F1\u02F2\x070\x02\x02\u02F2\u02F3\x07n\x02\x02\u02F3\u02F4" +
"\x07g\x02\x02\u02F4\u02F5\x07p\x02\x02\u02F5\u02F6\x07i\x02\x02\u02F6" +
"\u02F7\x07v\x02\x02\u02F7\u030E\x07j\x02\x02\u02F8\u02F9\x07v\x02\x02" +
"\u02F9\u02FA\x07z\x02\x02\u02FA\u02FB\x070\x02\x02\u02FB\u02FC\x07x\x02" +
"\x02\u02FC\u02FD\x07g\x02\x02\u02FD\u02FE\x07t\x02\x02\u02FE\u02FF\x07" +
"u\x02\x02\u02FF\u0300\x07k\x02\x02\u0300\u0301\x07q\x02\x02\u0301\u030E" +
"\x07p\x02\x02\u0302\u0303\x07v\x02\x02\u0303\u0304\x07z\x02\x02\u0304" +
"\u0305\x070\x02\x02\u0305\u0306\x07n\x02\x02\u0306\u0307\x07q\x02\x02" +
"\u0307\u0308\x07e\x02\x02\u0308\u0309\x07m\x02\x02\u0309\u030A\x07v\x02" +
"\x02\u030A\u030B\x07k\x02\x02\u030B\u030C\x07o\x02\x02\u030C\u030E\x07" +
"g\x02\x02\u030D\u02AF\x03\x02\x02\x02\u030D\u02C4\x03\x02\x02\x02\u030D" +
"\u02D7\x03\x02\x02\x02\u030D\u02E7\x03\x02\x02\x02\u030D\u02F8\x03\x02" +
"\x02\x02\u030D\u0302\x03\x02\x02\x02\u030E\x8A\x03\x02\x02\x02\u030F\u0313" +
"\t\n\x02\x02\u0310\u0312\t\v\x02\x02\u0311\u0310\x03\x02\x02\x02\u0312" +
"\u0315\x03\x02\x02\x02\u0313\u0311\x03\x02\x02\x02\u0313\u0314\x03\x02" +
"\x02\x02\u0314\x8C\x03\x02\x02\x02\u0315\u0313\x03\x02\x02\x02\u0316\u0318" +
"\t\f\x02\x02\u0317\u0316\x03\x02\x02\x02\u0318\u0319\x03\x02\x02\x02\u0319" +
"\u0317\x03\x02\x02\x02\u0319\u031A\x03\x02\x02\x02\u031A\u031B\x03\x02" +
"\x02\x02\u031B\u031C\bG\x02\x02\u031C\x8E\x03\x02\x02\x02\u031D\u031E" +
"\x071\x02\x02\u031E\u031F\x07,\x02\x02\u031F\u0323\x03\x02\x02\x02\u0320" +
"\u0322\v\x02\x02\x02\u0321\u0320\x03\x02\x02\x02\u0322\u0325\x03\x02\x02" +
"\x02\u0323\u0324\x03\x02\x02\x02\u0323\u0321\x03\x02\x02\x02\u0324\u0326" +
"\x03\x02\x02\x02\u0325\u0323\x03\x02\x02\x02\u0326\u0327\x07,\x02\x02" +
"\u0327\u0328\x071\x02\x02\u0328\u0329\x03\x02\x02\x02\u0329\u032A\bH\x03" +
"\x02\u032A\x90\x03\x02\x02\x02\u032B\u032C\x071\x02\x02\u032C\u032D\x07" +
"1\x02\x02\u032D\u0331\x03\x02\x02\x02\u032E\u0330\n\r\x02\x02\u032F\u032E" +
"\x03\x02\x02\x02\u0330\u0333\x03\x02\x02\x02\u0331\u032F\x03\x02\x02\x02" +
"\u0331\u0332\x03\x02\x02\x02\u0332\u0334\x03\x02\x02\x02\u0333\u0331\x03" +
"\x02\x02\x02\u0334\u0335\bI\x03\x02\u0335\x92\x03\x02\x02\x02\x1B\x02" +
"\u01FF\u0205\u020B\u0216\u0251\u0254\u0259\u025F\u0261\u026A\u0270\u0276" +
"\u027D\u027F\u0287\u0289\u028D\u029D\u02AD\u030D\u0313\u0319\u0323\u0331" +
"\x04\b\x02\x02\x02\x03\x02";
CashScriptLexer._serializedATN = Utils.join([
CashScriptLexer._serializedATNSegment0,
CashScriptLexer._serializedATNSegment1,
], "");
CashScriptLexer._serializedATN = [4, 0, 72, 820, 6, -1, 2, 0,
7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9,
7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7,
16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23,
2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2,
31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38,
7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7,
45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52,
2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2,
60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67,
7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1,
5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10,
1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1,
13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17,
1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1,
20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23,
1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1,
25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26,
1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1,
27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28,
1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1,
29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30,
1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1,
31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32,
1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1,
33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33,
1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1,
34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35,
1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1,
37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44,
1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1,
49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52,
1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1,
54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56,
1, 56, 1, 57, 4, 57, 508, 8, 57, 11, 57, 12, 57, 509, 1, 57, 1, 57, 4, 57, 514, 8, 57, 11, 57, 12,
57, 515, 1, 57, 1, 57, 4, 57, 520, 8, 57, 11, 57, 12, 57, 521, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58,
1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 533, 8, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1,
59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59,
1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1,
59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59,
1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 592, 8, 59, 1, 60, 3, 60, 595, 8, 60, 1, 60, 4, 60,
598, 8, 60, 11, 60, 12, 60, 599, 1, 60, 1, 60, 4, 60, 604, 8, 60, 11, 60, 12, 60, 605, 3, 60, 608,
8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 617, 8, 61, 1, 61, 1, 61, 1, 61, 1,
61, 3, 61, 623, 8, 61, 1, 62, 1, 62, 5, 62, 627, 8, 62, 10, 62, 12, 62, 630, 9, 62, 1, 63, 1, 63,
1, 63, 1, 63, 5, 63, 636, 8, 63, 10, 63, 12, 63, 639, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5,
63, 646, 8, 63, 10, 63, 12, 63, 649, 9, 63, 1, 63, 3, 63, 652, 8, 63, 1, 64, 1, 64, 1, 64, 1, 64,
1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 5, 65, 666, 8, 65, 10, 65, 12, 65, 669, 9,
65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66,
684, 8, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1,
67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67,
1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1,
67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67,
1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1,
67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67,
1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 780, 8, 67, 1, 68, 1, 68, 5,
68, 784, 8, 68, 10, 68, 12, 68, 787, 9, 68, 1, 69, 4, 69, 790, 8, 69, 11, 69, 12, 69, 791, 1, 69,
1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 5, 70, 800, 8, 70, 10, 70, 12, 70, 803, 9, 70, 1, 70, 1, 70, 1,
70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 5, 71, 814, 8, 71, 10, 71, 12, 71, 817, 9, 71, 1, 71,
1, 71, 3, 637, 647, 801, 0, 72, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21,
11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45,
23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69,
35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93,
47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115,
58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68,
137, 69, 139, 70, 141, 71, 143, 72, 1, 0, 12, 1, 0, 48, 57, 1, 0, 45, 45, 2, 0, 69, 69, 101, 101,
1, 0, 49, 57, 3, 0, 10, 10, 13, 13, 34, 34, 3, 0, 10, 10, 13, 13, 39, 39, 2, 0, 88, 88, 120, 120,
3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 65, 90, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3,
0, 9, 10, 12, 13, 32, 32, 2, 0, 10, 10, 13, 13, 855, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0,
0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17,
1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0,
0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39,
1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0,
0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61,
1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0,
0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83,
1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0,
0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0,
105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115,
1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1,
0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0,
0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 1, 145, 1, 0, 0,
0, 3, 152, 1, 0, 0, 0, 5, 154, 1, 0, 0, 0, 7, 165, 1, 0, 0, 0, 9, 167, 1, 0, 0, 0, 11, 169, 1, 0, 0,
0, 13, 172, 1, 0, 0, 0, 15, 174, 1, 0, 0, 0, 17, 176, 1, 0, 0, 0, 19, 179, 1, 0, 0, 0, 21, 181, 1,
0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 192, 1, 0, 0, 0, 27, 194, 1, 0, 0, 0, 29, 203, 1, 0, 0, 0, 31, 205,
1, 0, 0, 0, 33, 207, 1, 0, 0, 0, 35, 209, 1, 0, 0, 0, 37, 217, 1, 0, 0, 0, 39, 220, 1, 0, 0, 0, 41,
225, 1, 0, 0, 0, 43, 237, 1, 0, 0, 0, 45, 241, 1, 0, 0, 0, 47, 243, 1, 0, 0, 0, 49, 245, 1, 0, 0, 0,
51, 256, 1, 0, 0, 0, 53, 263, 1, 0, 0, 0, 55, 280, 1, 0, 0, 0, 57, 295, 1, 0, 0, 0, 59, 310, 1, 0,
0, 0, 61, 323, 1, 0, 0, 0, 63, 333, 1, 0, 0, 0, 65, 358, 1, 0, 0, 0, 67, 373, 1, 0, 0, 0, 69, 392,
1, 0, 0, 0, 71, 408, 1, 0, 0, 0, 73, 419, 1, 0, 0, 0, 75, 427, 1, 0, 0, 0, 77, 434, 1, 0, 0, 0, 79,
436, 1, 0, 0, 0, 81, 438, 1, 0, 0, 0, 83, 440, 1, 0, 0, 0, 85, 442, 1, 0, 0, 0, 87, 444, 1, 0, 0, 0,
89, 446, 1, 0, 0, 0, 91, 449, 1, 0, 0, 0, 93, 452, 1, 0, 0, 0, 95, 454, 1, 0, 0, 0, 97, 456, 1, 0,
0, 0, 99, 459, 1, 0, 0, 0, 101, 462, 1, 0, 0, 0, 103, 471, 1, 0, 0, 0, 105, 475, 1, 0, 0, 0, 107,
480, 1, 0, 0, 0, 109, 487, 1, 0, 0, 0, 111, 494, 1, 0, 0, 0, 113, 498, 1, 0, 0, 0, 115, 507, 1, 0,
0, 0, 117, 532, 1, 0, 0, 0, 119, 591, 1, 0, 0, 0, 121, 594, 1, 0, 0, 0, 123, 622, 1, 0, 0, 0, 125,
624, 1, 0, 0, 0, 127, 651, 1, 0, 0, 0, 129, 653, 1, 0, 0, 0, 131, 662, 1, 0, 0, 0, 133, 683, 1, 0,
0, 0, 135, 779, 1, 0, 0, 0, 137, 781, 1, 0, 0, 0, 139, 789, 1, 0, 0, 0, 141, 795, 1, 0, 0, 0, 143,
809, 1, 0, 0, 0, 145, 146, 5, 112, 0, 0, 146, 147, 5, 114, 0, 0, 147, 148, 5, 97, 0, 0, 148, 149,
5, 103, 0, 0, 149, 150, 5, 109, 0, 0, 150, 151, 5, 97, 0, 0, 151, 2, 1, 0, 0, 0, 152, 153, 5, 59,
0, 0, 153, 4, 1, 0, 0, 0, 154, 155, 5, 99, 0, 0, 155, 156, 5, 97, 0, 0, 156, 157, 5, 115, 0, 0, 157,
158, 5, 104, 0, 0, 158, 159, 5, 115, 0, 0, 159, 160, 5, 99, 0, 0, 160, 161, 5, 114, 0, 0, 161,
162, 5, 105, 0, 0, 162, 163, 5, 112, 0, 0, 163, 164, 5, 116, 0, 0, 164, 6, 1, 0, 0, 0, 165, 166,
5, 94, 0, 0, 166, 8, 1, 0, 0, 0, 167, 168, 5, 126, 0, 0, 168, 10, 1, 0, 0, 0, 169, 170, 5, 62, 0,
0, 170, 171, 5, 61, 0, 0, 171, 12, 1, 0, 0, 0, 172, 173, 5, 62, 0, 0, 173, 14, 1, 0, 0, 0, 174, 175,
5, 60, 0, 0, 175, 16, 1, 0, 0, 0, 176, 177, 5, 60, 0, 0, 177, 178, 5, 61, 0, 0, 178, 18, 1, 0, 0,
0, 179, 180, 5, 61, 0, 0, 180, 20, 1, 0, 0, 0, 181, 182, 5, 99, 0, 0, 182, 183, 5, 111, 0, 0, 183,
184, 5, 110, 0, 0, 184, 185, 5, 116, 0, 0, 185, 186, 5, 114, 0, 0, 186, 187, 5, 97, 0, 0, 187,
188, 5, 99, 0, 0, 188, 189, 5, 116, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 123, 0, 0, 191, 24,
1, 0, 0, 0, 192, 193, 5, 125, 0, 0, 193, 26, 1, 0, 0, 0, 194, 195, 5, 102, 0, 0, 195, 196, 5, 117,
0, 0, 196, 197, 5, 110, 0, 0, 197, 198, 5, 99, 0, 0, 198, 199, 5, 116, 0, 0, 199, 200, 5, 105,
0, 0, 200, 201, 5, 111, 0, 0, 201, 202, 5, 110, 0, 0, 202, 28, 1, 0, 0, 0, 203, 204, 5, 40, 0, 0,
204, 30, 1, 0, 0, 0, 205, 206, 5, 44, 0, 0, 206, 32, 1, 0, 0, 0, 207, 208, 5, 41, 0, 0, 208, 34,
1, 0, 0, 0, 209, 210, 5, 114, 0, 0, 210, 211, 5, 101, 0, 0, 211, 212, 5, 113, 0, 0, 212, 213, 5,
117, 0, 0, 213, 214, 5, 105, 0, 0, 214, 215, 5, 114, 0, 0, 215, 216, 5, 101, 0, 0, 216, 36, 1,
0, 0, 0, 217, 218, 5, 105, 0, 0, 218, 219, 5, 102, 0, 0, 219, 38, 1, 0, 0, 0, 220, 221, 5, 101,
0, 0, 221, 222, 5, 108, 0, 0, 222, 223, 5, 115, 0, 0, 223, 224, 5, 101, 0, 0, 224, 40, 1, 0, 0,
0, 225, 226, 5, 99, 0, 0, 226, 227, 5, 111, 0, 0, 227, 228, 5, 110, 0, 0, 228, 229, 5, 115, 0,
0, 229, 230, 5, 111, 0, 0, 230, 231, 5, 108, 0, 0, 231, 232, 5, 101, 0, 0, 232, 233, 5, 46, 0,
0, 233, 234, 5, 108, 0, 0, 234, 235, 5, 111, 0, 0, 235, 236, 5, 103, 0, 0, 236, 42, 1, 0, 0, 0,
237, 238, 5, 110, 0, 0, 238, 239, 5, 101, 0, 0, 239, 240, 5, 119, 0, 0, 240, 44, 1, 0, 0, 0, 241,
242, 5, 91, 0, 0, 242, 46, 1, 0, 0, 0, 243, 244, 5, 93, 0, 0, 244, 48, 1, 0, 0, 0, 245, 246, 5, 116,
0, 0, 246, 247, 5, 120, 0, 0, 247, 248, 5, 46, 0, 0, 248, 249, 5, 111, 0, 0, 249, 250, 5, 117,
0, 0, 250, 251, 5, 116, 0, 0, 251, 252, 5, 112, 0, 0, 252, 253, 5, 117, 0, 0, 253, 254, 5, 116,
0, 0, 254, 255, 5, 115, 0, 0, 255, 50, 1, 0, 0, 0, 256, 257, 5, 46, 0, 0, 257, 258, 5, 118, 0, 0,
258, 259, 5, 97, 0, 0, 259, 260, 5, 108, 0, 0, 260, 261, 5, 117, 0, 0, 261, 262, 5, 101, 0, 0,
262, 52, 1, 0, 0, 0, 263, 264, 5, 46, 0, 0, 264, 265, 5, 108, 0, 0, 265, 266, 5, 111, 0, 0, 266,
267, 5, 99, 0, 0, 267, 268, 5, 107, 0, 0, 268, 269, 5, 105, 0, 0, 269, 270, 5, 110, 0, 0, 270,
271, 5, 103, 0, 0, 271, 272, 5, 66, 0, 0, 272, 273, 5, 121, 0, 0, 273, 274, 5, 116, 0, 0, 274,
275, 5, 101, 0, 0, 275, 276, 5, 99, 0, 0, 276, 277, 5, 111, 0, 0, 277, 278, 5, 100, 0, 0, 278,
279, 5, 101, 0, 0, 279, 54, 1, 0, 0, 0, 280, 281, 5, 46, 0, 0, 281, 282, 5, 116, 0, 0, 282, 283,
5, 111, 0, 0, 283, 284, 5, 107, 0, 0, 284, 285, 5, 101, 0, 0, 285, 286, 5, 110, 0, 0, 286, 287,
5, 67, 0, 0, 287, 288, 5, 97, 0, 0, 288, 289, 5, 116, 0, 0, 289, 290, 5, 101, 0, 0, 290, 291, 5,
103, 0, 0, 291, 292, 5, 111, 0, 0, 292, 293, 5, 114, 0, 0, 293, 294, 5, 121, 0, 0, 294, 56, 1,
0, 0, 0, 295, 296, 5, 46, 0, 0, 296, 297, 5, 110, 0, 0, 297, 298, 5, 102, 0, 0, 298, 299, 5, 116,
0, 0, 299, 300, 5, 67, 0, 0, 300, 301, 5, 111, 0, 0, 301, 302, 5, 109, 0, 0, 302, 303, 5, 109,
0, 0, 303, 304, 5, 105, 0, 0, 304, 305, 5, 116, 0, 0, 305, 306, 5, 109, 0, 0, 306, 307, 5, 101,
0, 0, 307, 308, 5, 110, 0, 0, 308, 309, 5, 116, 0, 0, 309, 58, 1, 0, 0, 0, 310, 311, 5, 46, 0, 0,
311, 312, 5, 116, 0, 0, 312, 313, 5, 111, 0, 0, 313, 314, 5, 107, 0, 0, 314, 315, 5, 101, 0, 0,
315, 316, 5, 110, 0, 0, 316, 317, 5, 65, 0, 0, 317, 318, 5, 109, 0, 0, 318, 319, 5, 111, 0, 0,
319, 320, 5, 117, 0, 0, 320, 321, 5, 110, 0, 0, 321, 322, 5, 116, 0, 0, 322, 60, 1, 0, 0, 0, 323,
324, 5, 116, 0, 0, 324, 325, 5, 120, 0, 0, 325, 326, 5, 46, 0, 0, 326, 327, 5, 105, 0, 0, 327,
328, 5, 110, 0, 0, 328, 329, 5, 112, 0, 0, 329, 330, 5, 117, 0, 0, 330, 331, 5, 116, 0, 0, 331,
332, 5, 115, 0, 0, 332, 62, 1, 0, 0, 0, 333, 334, 5, 46, 0, 0, 334, 335, 5, 111, 0, 0, 335, 336,
5, 117, 0, 0, 336, 337, 5, 116, 0, 0, 337, 338, 5, 112, 0, 0, 338, 339, 5, 111, 0, 0, 339, 340,
5, 105, 0, 0, 340, 341, 5, 110, 0, 0, 341, 342, 5, 116, 0, 0, 342, 343, 5, 84, 0, 0, 343, 344,
5, 114, 0, 0, 344, 345, 5, 97, 0, 0, 345, 346, 5, 110, 0, 0, 346, 347, 5, 115, 0, 0, 347, 348,
5, 97, 0, 0, 348, 349, 5, 99, 0, 0, 349, 350, 5, 116, 0, 0, 350, 351, 5, 105, 0, 0, 351, 352, 5,
111, 0, 0, 352, 353, 5, 110, 0, 0, 353, 354, 5, 72, 0, 0, 354, 355, 5, 97, 0, 0, 355, 356, 5, 115,
0, 0, 356, 357, 5, 104, 0, 0, 357, 64, 1, 0, 0, 0, 358, 359, 5, 46, 0, 0, 359, 360, 5, 111, 0, 0,
360, 361, 5, 117, 0, 0, 361, 362, 5, 116, 0, 0, 362, 363, 5, 112, 0, 0, 363, 364, 5, 111, 0, 0,
364, 365, 5, 105, 0, 0, 365, 366, 5, 110, 0, 0, 366, 367, 5, 116, 0, 0, 367, 368, 5, 73, 0, 0,
368, 369, 5, 110, 0, 0, 369, 370, 5, 100, 0, 0, 370, 371, 5, 101, 0, 0, 371, 372, 5, 120, 0, 0,
372, 66, 1, 0, 0, 0, 373, 374, 5, 46, 0, 0, 374, 375, 5, 117, 0, 0, 375, 376, 5, 110, 0, 0, 376,
377, 5, 108, 0, 0, 377, 378, 5, 111, 0, 0, 378, 379, 5, 99, 0, 0, 379, 380, 5, 107, 0, 0, 380,
381, 5, 105, 0, 0, 381, 382, 5, 110, 0, 0, 382, 383, 5, 103, 0, 0, 383, 384, 5, 66, 0, 0, 384,
385, 5, 121, 0, 0, 385, 386, 5, 116, 0, 0, 386, 387, 5, 101, 0, 0, 387, 388, 5, 99, 0, 0, 388,
389, 5, 111, 0, 0, 389, 390, 5, 100, 0, 0, 390, 391, 5, 101, 0, 0, 391, 68, 1, 0, 0, 0, 392, 393,
5, 46, 0, 0, 393, 394, 5, 115, 0, 0, 394, 395, 5, 101, 0, 0, 395, 396, 5, 113, 0, 0, 396, 397,
5, 117, 0, 0, 397, 398, 5, 101, 0, 0, 398, 399, 5, 110, 0, 0, 399, 400, 5, 99, 0, 0, 400, 401,
5, 101, 0, 0, 401, 402, 5, 78, 0, 0, 402, 403, 5, 117, 0, 0, 403, 404, 5, 109, 0, 0, 404, 405,
5, 98, 0, 0, 405, 406, 5, 101, 0, 0, 406, 407, 5, 114, 0, 0, 407, 70, 1, 0, 0, 0, 408, 409, 5, 46,
0, 0, 409, 410, 5, 114, 0, 0, 410, 411, 5, 101, 0, 0, 411, 412, 5, 118, 0, 0, 412, 413, 5, 101,
0, 0, 413, 414, 5, 114, 0, 0, 414, 415, 5, 115, 0, 0, 415, 416, 5, 101, 0, 0, 416, 417, 5, 40,
0, 0, 417, 418, 5, 41, 0, 0, 418, 72, 1, 0, 0, 0, 419, 420, 5, 46, 0, 0, 420, 421, 5, 108, 0, 0,
421, 422, 5, 101, 0, 0, 422, 423, 5, 110, 0, 0, 423, 424, 5, 103, 0, 0, 424, 425, 5, 116, 0, 0,
425, 426, 5, 104, 0, 0, 426, 74, 1, 0, 0, 0, 427, 428, 5, 46, 0, 0, 428, 429, 5, 115, 0, 0, 429,
430, 5, 112, 0, 0, 430, 431, 5, 108, 0, 0, 431, 432, 5, 105, 0, 0, 432, 433, 5, 116, 0, 0, 433,
76, 1, 0, 0, 0, 434, 435, 5, 33, 0, 0, 435, 78, 1, 0, 0, 0, 436, 437, 5, 45, 0, 0, 437, 80, 1, 0,
0, 0, 438, 439, 5, 42, 0, 0, 439, 82, 1, 0, 0, 0, 440, 441, 5, 47, 0, 0, 441, 84, 1, 0, 0, 0, 442,
443, 5, 37, 0, 0, 443, 86, 1, 0, 0, 0, 444, 445, 5, 43, 0, 0, 445, 88, 1, 0, 0, 0, 446, 447, 5, 61,
0, 0, 447, 448, 5, 61, 0, 0, 448, 90, 1, 0, 0, 0, 449, 450, 5, 33, 0, 0, 450, 451, 5, 61, 0, 0, 451,
92, 1, 0, 0, 0, 452, 453, 5, 38, 0, 0, 453, 94, 1, 0, 0, 0, 454, 455, 5, 124, 0, 0, 455, 96, 1, 0,
0, 0, 456, 457, 5, 38, 0, 0, 457, 458, 5, 38, 0, 0, 458, 98, 1, 0, 0, 0, 459, 460, 5, 124, 0, 0,
460, 461, 5, 124, 0, 0, 461, 100, 1, 0, 0, 0, 462, 463, 5, 99, 0, 0, 463, 464, 5, 111, 0, 0, 464,
465, 5, 110, 0, 0, 465, 466, 5, 115, 0, 0, 466, 467, 5, 116, 0, 0, 467, 468, 5, 97, 0, 0, 468,
469, 5, 110, 0, 0, 469, 470, 5, 116, 0, 0, 470, 102, 1, 0, 0, 0, 471, 472, 5, 105, 0, 0, 472, 473,
5, 110, 0, 0, 473, 474, 5, 116, 0, 0, 474, 104, 1, 0, 0, 0, 475, 476, 5, 98, 0, 0, 476, 477, 5,
111, 0, 0, 477, 478, 5, 111, 0, 0, 478, 479, 5, 108, 0, 0, 479, 106, 1, 0, 0, 0, 480, 481, 5, 115,
0, 0, 481, 482, 5, 116, 0, 0, 482, 483, 5, 114, 0, 0, 483, 484, 5, 105, 0, 0, 484, 485, 5, 110,
0, 0, 485, 486, 5, 103, 0, 0, 486, 108, 1, 0, 0, 0, 487, 488, 5, 112, 0, 0, 488, 489, 5, 117, 0,
0, 489, 490, 5, 98, 0, 0, 490, 491, 5, 107, 0, 0, 491, 492, 5, 101, 0, 0, 492, 493, 5, 121, 0,
0, 493, 110, 1, 0, 0, 0, 494, 495, 5, 115, 0, 0, 495, 496, 5, 105, 0, 0, 496, 497, 5, 103, 0, 0,
497, 112, 1, 0, 0, 0, 498, 499, 5, 100, 0, 0, 499, 500, 5, 97, 0, 0, 500, 501, 5, 116, 0, 0, 501,
502, 5, 97, 0, 0, 502, 503, 5, 115, 0, 0, 503, 504, 5, 105, 0, 0, 504, 505, 5, 103, 0, 0, 505,
114, 1, 0, 0, 0, 506, 508, 7, 0, 0, 0, 507, 506, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 507, 1, 0,
0, 0, 509, 510, 1, 0, 0, 0, 510, 511, 1, 0, 0, 0, 511, 513, 5, 46, 0, 0, 512, 514, 7, 0, 0, 0, 513,
512, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 513, 1, 0, 0, 0, 515, 516, 1, 0, 0, 0, 516, 517, 1, 0,
0, 0, 517, 519, 5, 46, 0, 0, 518, 520, 7, 0, 0, 0, 519, 518, 1, 0, 0, 0, 520, 521, 1, 0, 0, 0, 521,
519, 1, 0, 0, 0, 521, 522, 1, 0, 0, 0, 522, 116, 1, 0, 0, 0, 523, 524, 5, 116, 0, 0, 524, 525, 5,
114, 0, 0, 525, 526, 5, 117, 0, 0, 526, 533, 5, 101, 0, 0, 527, 528, 5, 102, 0, 0, 528, 529, 5,
97, 0, 0, 529, 530, 5, 108, 0, 0, 530, 531, 5, 115, 0, 0, 531, 533, 5, 101, 0, 0, 532, 523, 1,
0, 0, 0, 532, 527, 1, 0, 0, 0, 533, 118, 1, 0, 0, 0, 534, 535, 5, 115, 0, 0, 535, 536, 5, 97, 0,
0, 536, 537, 5, 116, 0, 0, 537, 538, 5, 111, 0, 0, 538, 539, 5, 115, 0, 0, 539, 540, 5, 104, 0,
0, 540, 541, 5, 105, 0, 0, 541, 592, 5, 115, 0, 0, 542, 543, 5, 115, 0, 0, 543, 544, 5, 97, 0,
0, 544, 545, 5, 116, 0, 0, 545, 592, 5, 115, 0, 0, 546, 547, 5, 102, 0, 0, 547, 548, 5, 105, 0,
0, 548, 549, 5, 110, 0, 0, 549, 550, 5, 110, 0, 0, 550, 551, 5, 101, 0, 0, 551, 592, 5, 121, 0,
0, 552, 553, 5, 98, 0, 0, 553, 554, 5, 105, 0, 0, 554, 555, 5, 116, 0, 0, 555, 592, 5, 115, 0,
0, 556, 557, 5, 98, 0, 0, 557, 558, 5, 105, 0, 0, 558, 559, 5, 116, 0, 0, 559, 560, 5, 99, 0, 0,
560, 561, 5, 111, 0, 0, 561, 562, 5, 105, 0, 0, 562, 592, 5, 110, 0, 0, 563, 564, 5, 115, 0, 0,
564, 565, 5, 101, 0, 0, 565, 566, 5, 99, 0, 0, 566, 567, 5, 111, 0, 0, 567, 568, 5, 110, 0, 0,
568, 569, 5, 100, 0, 0, 569, 592, 5, 115, 0, 0, 570, 571, 5, 109, 0, 0, 571, 572, 5, 105, 0, 0,
572, 573, 5, 110, 0, 0, 573, 574, 5, 117, 0, 0, 574, 575, 5, 116, 0, 0, 575, 576, 5, 101, 0, 0,
576, 592, 5, 115, 0, 0, 577, 578, 5, 104, 0, 0, 578, 579, 5, 111, 0, 0, 579, 580, 5, 117, 0, 0,
580, 581, 5, 114, 0, 0, 581, 592, 5, 115, 0, 0, 582, 583, 5, 100, 0, 0, 583, 584, 5, 97, 0, 0,
584, 585, 5, 121, 0, 0, 585, 592, 5, 115, 0, 0, 586, 587, 5, 119, 0, 0, 587, 588, 5, 101, 0, 0,
588, 589, 5, 101, 0, 0, 589, 590, 5, 107, 0, 0, 590, 592, 5, 115, 0, 0, 591, 534, 1, 0, 0, 0, 591,
542, 1, 0, 0, 0, 591, 546, 1, 0, 0, 0, 591, 552, 1, 0, 0, 0, 591, 556, 1, 0, 0, 0, 591, 563, 1, 0,
0, 0, 591, 570, 1, 0, 0, 0, 591, 577, 1, 0, 0, 0, 591, 582, 1, 0, 0, 0, 591, 586, 1, 0, 0, 0, 592,
120, 1, 0, 0, 0, 593, 595, 7, 1, 0, 0, 594, 593, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 597, 1, 0,
0, 0, 596, 598, 7, 0, 0, 0, 597, 596, 1, 0, 0, 0, 598, 599, 1, 0, 0, 0, 599, 597, 1, 0, 0, 0, 599,
600, 1, 0, 0, 0, 600, 607, 1, 0, 0, 0, 601, 603, 7, 2, 0, 0, 602, 604, 7, 0, 0, 0, 603, 602, 1, 0,
0, 0, 604, 605, 1, 0, 0, 0, 605, 603, 1, 0, 0, 0, 605, 606, 1, 0, 0, 0, 606, 608, 1, 0, 0, 0, 607,
601, 1, 0, 0, 0, 607, 608, 1, 0, 0, 0, 608, 122, 1, 0, 0, 0, 609, 610, 5, 98, 0, 0, 610, 611, 5,
121, 0, 0, 611, 612, 5, 116, 0, 0, 612, 613, 5, 101, 0, 0, 613, 614, 5, 115, 0, 0, 614, 616, 1,
0, 0, 0, 615, 617, 3, 125, 62, 0, 616, 615, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 623, 1, 0, 0,
0, 618, 619, 5, 98, 0, 0, 619, 620, 5, 121, 0, 0, 620, 621, 5, 116, 0, 0, 621, 623, 5, 101, 0,
0, 622, 609, 1, 0, 0, 0, 622, 618, 1, 0, 0, 0, 623, 124, 1, 0, 0, 0, 624, 628, 7, 3, 0, 0, 625, 627,
7, 0, 0, 0, 626, 625, 1, 0, 0, 0, 627, 630, 1, 0, 0, 0, 628, 626, 1, 0, 0, 0, 628, 629, 1, 0, 0, 0,
629, 126, 1, 0, 0, 0, 630, 628, 1, 0, 0, 0, 631, 637, 5, 34, 0, 0, 632, 633, 5, 92, 0, 0, 633, 636,
5, 34, 0, 0, 634, 636, 8, 4, 0, 0, 635, 632, 1, 0, 0, 0, 635, 634, 1, 0, 0, 0, 636, 639, 1, 0, 0,
0, 637, 638, 1, 0, 0, 0, 637, 635, 1, 0, 0, 0, 638, 640, 1, 0, 0, 0, 639, 637, 1, 0, 0, 0, 640, 652,
5, 34, 0, 0, 641, 647, 5, 39, 0, 0, 642, 643, 5, 92, 0, 0, 643, 646, 5, 39, 0, 0, 644, 646, 8, 5,
0, 0, 645, 642, 1, 0, 0, 0, 645, 644, 1, 0, 0, 0, 646, 649, 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 647,
645, 1, 0, 0, 0, 648, 650, 1, 0, 0, 0, 649, 647, 1, 0, 0, 0, 650, 652, 5, 39, 0, 0, 651, 631, 1,
0, 0, 0, 651, 641, 1, 0, 0, 0, 652, 128, 1, 0, 0, 0, 653, 654, 5, 100, 0, 0, 654, 655, 5, 97, 0,
0, 655, 656, 5, 116, 0, 0, 656, 657, 5, 101, 0, 0, 657, 658, 5, 40, 0, 0, 658, 659, 1, 0, 0, 0,
659, 660, 3, 127, 63, 0, 660, 661, 5, 41, 0, 0, 661, 130, 1, 0, 0, 0, 662, 663, 5, 48, 0, 0, 663,
667, 7, 6, 0, 0, 664, 666, 7, 7, 0, 0, 665, 664, 1, 0, 0, 0, 666, 669, 1, 0, 0, 0, 667, 665, 1, 0,
0, 0, 667, 668, 1, 0, 0, 0, 668, 132, 1, 0, 0, 0, 669, 667, 1, 0, 0, 0, 670, 671, 5, 116, 0, 0, 671,
672, 5, 120, 0, 0, 672, 673, 5, 46, 0, 0, 673, 674, 5, 97, 0, 0, 674, 675, 5, 103, 0, 0, 675, 684,
5, 101, 0, 0, 676, 677, 5, 116, 0, 0, 677, 678, 5, 120, 0, 0, 678, 679, 5, 46, 0, 0, 679, 680,
5, 116, 0, 0, 680, 681, 5, 105, 0, 0, 681, 682, 5, 109, 0, 0, 682, 684, 5, 101, 0, 0, 683, 670,
1, 0, 0, 0, 683, 676, 1, 0, 0, 0, 684, 134, 1, 0, 0, 0, 685, 686, 5, 116, 0, 0, 686, 687, 5, 104,
0, 0, 687, 688, 5, 105, 0, 0, 688, 689, 5, 115, 0, 0, 689, 690, 5, 46, 0, 0, 690, 691, 5, 97, 0,
0, 691, 692, 5, 99, 0, 0, 692, 693, 5, 116, 0, 0, 693, 694, 5, 105, 0, 0, 694, 695, 5, 118, 0,
0, 695, 696, 5, 101, 0, 0, 696, 697, 5, 73, 0, 0, 697, 698, 5, 110, 0, 0, 698, 699, 5, 112, 0,
0, 699, 700, 5, 117, 0, 0, 700, 701, 5, 116, 0, 0, 701, 702, 5, 73, 0, 0, 702, 703, 5, 110, 0,
0, 703, 704, 5, 100, 0, 0, 704, 705, 5, 101, 0, 0, 705, 780, 5, 120, 0, 0, 706, 707, 5, 116, 0,
0, 707, 708, 5, 104, 0, 0, 708, 709, 5, 105, 0, 0, 709, 710, 5, 115, 0, 0, 710, 711, 5, 46, 0,
0, 711, 712, 5, 97, 0, 0, 712, 713, 5, 99, 0, 0, 713, 714, 5, 116, 0, 0, 714, 715, 5, 105, 0, 0,
715, 716, 5, 118, 0, 0, 716, 717, 5, 101, 0, 0, 717, 718, 5, 66, 0, 0, 718, 719, 5, 121, 0, 0,
719, 720, 5, 116, 0, 0, 720, 721, 5, 101, 0, 0, 721, 722, 5, 99, 0, 0, 722, 723, 5, 111, 0, 0,
723, 724, 5, 100, 0, 0, 724, 780, 5, 101, 0, 0, 725, 726, 5, 116, 0, 0, 726, 727, 5, 120, 0, 0,
727, 728, 5, 46, 0, 0, 728, 729, 5, 105, 0, 0, 729, 730, 5, 110, 0, 0, 730, 731, 5, 112, 0, 0,
731, 732, 5, 117, 0, 0, 732, 733, 5, 116, 0, 0, 733, 734, 5, 115, 0, 0, 734, 735, 5, 46, 0, 0,
735, 736, 5, 108, 0, 0, 736, 737, 5, 101, 0, 0, 737, 738, 5, 110, 0, 0, 738, 739, 5, 103, 0, 0,
739, 740, 5, 116, 0, 0, 740, 780, 5, 104, 0, 0, 741, 742, 5, 116, 0, 0, 742, 743, 5, 120, 0, 0,
743, 744, 5, 46, 0, 0, 744, 745, 5, 111, 0, 0, 745, 746, 5, 117, 0, 0, 746, 747, 5, 116, 0, 0,
747, 748, 5, 112, 0, 0, 748, 749, 5, 117, 0, 0, 749, 750, 5, 116, 0, 0, 750, 751, 5, 115, 0, 0,
751, 752, 5, 46, 0, 0, 752, 753, 5, 108, 0, 0, 753, 754, 5, 101, 0, 0, 754, 755, 5, 110, 0, 0,
755, 756, 5, 103, 0, 0, 756, 757, 5, 116, 0, 0, 757, 780, 5, 104, 0, 0, 758, 759, 5, 116, 0, 0,
759, 760, 5, 120, 0, 0, 760, 761, 5, 46, 0, 0, 761, 762, 5, 118, 0, 0, 762, 763, 5, 101, 0, 0,
763, 764, 5, 114, 0, 0, 764, 765, 5, 115, 0, 0, 765, 766, 5, 105, 0, 0, 766, 767, 5, 111, 0, 0,
767, 780, 5, 110, 0, 0, 768, 769, 5, 116, 0, 0, 769, 770, 5, 120, 0, 0, 770, 771, 5, 46, 0, 0,
771, 772, 5, 108, 0, 0, 772, 773, 5, 111, 0, 0, 773, 774, 5, 99, 0, 0, 774, 775, 5, 107, 0, 0,
775, 776, 5, 116, 0, 0, 776, 777, 5, 105, 0, 0, 777, 778, 5, 109, 0, 0, 778, 780, 5, 101, 0, 0,
779, 685, 1, 0, 0, 0, 779, 706, 1, 0, 0, 0, 779, 725, 1, 0, 0, 0, 779, 741, 1, 0, 0, 0, 779, 758,
1, 0, 0, 0, 779, 768, 1, 0, 0, 0, 780, 136, 1, 0, 0, 0, 781, 785, 7, 8, 0, 0, 782, 784, 7, 9, 0, 0,
783, 782, 1, 0, 0, 0, 784, 787, 1, 0, 0, 0, 785, 783, 1, 0, 0, 0, 785, 786, 1, 0, 0, 0, 786, 138,
1, 0, 0, 0, 787, 785, 1, 0, 0, 0, 788, 790, 7, 10, 0, 0, 789, 788, 1, 0, 0, 0, 790, 791, 1, 0, 0,
0, 791, 789, 1, 0, 0, 0, 791, 792, 1, 0, 0, 0, 792, 793, 1, 0, 0, 0, 793, 794, 6, 69, 0, 0, 794,
140, 1, 0, 0, 0, 795, 796, 5, 47, 0, 0, 796, 797, 5, 42, 0, 0, 797, 801, 1, 0, 0, 0, 798, 800, 9,
0, 0, 0, 799, 798, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0, 802,
804, 1, 0, 0, 0, 803, 801, 1, 0, 0, 0, 804, 805, 5, 42, 0, 0, 805, 806, 5, 47, 0, 0, 806, 807, 1,
0, 0, 0, 807, 808, 6, 70, 1, 0, 808, 142, 1, 0, 0, 0, 809, 810, 5, 47, 0, 0, 810, 811, 5, 47, 0,
0, 811, 815, 1, 0, 0, 0, 812, 814, 8, 11, 0, 0, 813, 812, 1, 0, 0, 0, 814, 817, 1, 0, 0, 0, 815,
813, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 818, 1, 0, 0, 0, 817, 815, 1, 0, 0, 0, 818, 819, 6, 71,
1, 0, 819, 144, 1, 0, 0, 0, 25, 0, 509, 515, 521, 532, 591, 594, 599, 605, 607, 616, 622, 628,
635, 637, 645, 647, 651, 667, 683, 779, 785, 791, 801, 815, 2, 6, 0, 0, 0, 1, 0];
CashScriptLexer.DecisionsToDFA = CashScriptLexer._ATN.decisionToState.map((ds, index) => new DFA(ds, index));
//# sourceMappingURL=CashScriptLexer.js.map

@@ -1,12 +0,4 @@

import { ATN } from "antlr4ts/atn/ATN.js";
import { FailedPredicateException } from "antlr4ts/FailedPredicateException.js";
import { Parser } from "antlr4ts/Parser.js";
import { ParserRuleContext } from "antlr4ts/ParserRuleContext.js";
import { RuleContext } from "antlr4ts/RuleContext.js";
import { TerminalNode } from "antlr4ts/tree/TerminalNode.js";
import { Token } from "antlr4ts/Token.js";
import { TokenStream } from "antlr4ts/TokenStream.js";
import { Vocabulary } from "antlr4ts/Vocabulary.js";
import { CashScriptVisitor } from "./CashScriptVisitor.js";
export declare class CashScriptParser extends Parser {
import { ATN, DFA, FailedPredicateException, Parser, RuleContext, ParserRuleContext, TerminalNode, Token, TokenStream } from 'antlr4';
import CashScriptVisitor from "./CashScriptVisitor.js";
export default class CashScriptParser extends Parser {
static readonly T__0 = 1;

@@ -84,2 +76,3 @@ static readonly T__1 = 2;

static readonly LINE_COMMENT = 72;
static readonly EOF: number;
static readonly RULE_sourceFile = 0;

@@ -104,19 +97,20 @@ static readonly RULE_pragmaDirective = 1;

static readonly RULE_consoleStatement = 18;
static readonly RULE_consoleParameter = 19;
static readonly RULE_consoleParameterList = 20;
static readonly RULE_functionCall = 21;
static readonly RULE_expressionList = 22;
static readonly RULE_expression = 23;
static readonly RULE_modifier = 24;
static readonly RULE_literal = 25;
static readonly RULE_numberLiteral = 26;
static readonly RULE_typeName = 27;
static readonly RULE_requireMessage = 19;
static readonly RULE_consoleParameter = 20;
static readonly RULE_consoleParameterList = 21;
static readonly RULE_functionCall = 22;
static readonly RULE_expressionList = 23;
static readonly RULE_expression = 24;
static readonly RULE_modifier = 25;
static readonly RULE_literal = 26;
static readonly RULE_numberLiteral = 27;
static readonly RULE_typeName = 28;
static readonly literalNames: (string | null)[];
static readonly symbolicNames: (string | null)[];
static readonly ruleNames: string[];
private static readonly _LITERAL_NAMES;
private static readonly _SYMBOLIC_NAMES;
static readonly VOCABULARY: Vocabulary;
get vocabulary(): Vocabulary;
get grammarFileName(): string;
get literalNames(): (string | null)[];
get symbolicNames(): (string | null)[];
get ruleNames(): string[];
get serializedATN(): string;
get serializedATN(): number[];
protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException;

@@ -143,2 +137,3 @@ constructor(input: TokenStream);

consoleStatement(): ConsoleStatementContext;
requireMessage(): RequireMessageContext;
consoleParameter(): ConsoleParameterContext;

@@ -154,14 +149,15 @@ consoleParameterList(): ConsoleParameterListContext;

typeName(): TypeNameContext;
sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean;
sempred(localctx: RuleContext, ruleIndex: number, predIndex: number): boolean;
private expression_sempred;
static readonly _serializedATN: string;
static __ATN: ATN;
static readonly _serializedATN: number[];
private static __ATN;
static get _ATN(): ATN;
static DecisionsToDFA: DFA[];
}
export declare class SourceFileContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
contractDefinition(): ContractDefinitionContext;
EOF(): TerminalNode;
pragmaDirective(): PragmaDirectiveContext[];
pragmaDirective_list(): PragmaDirectiveContext[];
pragmaDirective(i: number): PragmaDirectiveContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -171,5 +167,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class PragmaDirectiveContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
pragmaName(): PragmaNameContext;
pragmaValue(): PragmaValueContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -179,3 +175,3 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class PragmaNameContext extends ParserRuleContext {
constructor(parent: ParserRuleContext | undefined, invokingState: number);
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
get ruleIndex(): number;

@@ -185,5 +181,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class PragmaValueContext extends ParserRuleContext {
versionConstraint(): VersionConstraintContext[];
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
versionConstraint_list(): VersionConstraintContext[];
versionConstraint(i: number): VersionConstraintContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -193,5 +189,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class VersionConstraintContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
VersionLiteral(): TerminalNode;
versionOperator(): VersionOperatorContext | undefined;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
versionOperator(): VersionOperatorContext;
get ruleIndex(): number;

@@ -201,3 +197,3 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class VersionOperatorContext extends ParserRuleContext {
constructor(parent: ParserRuleContext | undefined, invokingState: number);
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
get ruleIndex(): number;

@@ -207,7 +203,7 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class ContractDefinitionContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
Identifier(): TerminalNode;
parameterList(): ParameterListContext;
functionDefinition(): FunctionDefinitionContext[];
functionDefinition_list(): FunctionDefinitionContext[];
functionDefinition(i: number): FunctionDefinitionContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -217,7 +213,7 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class FunctionDefinitionContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
Identifier(): TerminalNode;
parameterList(): ParameterListContext;
statement(): StatementContext[];
statement_list(): StatementContext[];
statement(i: number): StatementContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -227,5 +223,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class ParameterListContext extends ParserRuleContext {
parameter(): ParameterContext[];
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
parameter_list(): ParameterContext[];
parameter(i: number): ParameterContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -235,5 +231,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class ParameterContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
typeName(): TypeNameContext;
Identifier(): TerminalNode;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -243,5 +239,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class BlockContext extends ParserRuleContext {
statement(): StatementContext[];
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
statement_list(): StatementContext[];
statement(i: number): StatementContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -251,10 +247,10 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class StatementContext extends ParserRuleContext {
variableDefinition(): VariableDefinitionContext | undefined;
tupleAssignment(): TupleAssignmentContext | undefined;
assignStatement(): AssignStatementContext | undefined;
timeOpStatement(): TimeOpStatementContext | undefined;
requireStatement(): RequireStatementContext | undefined;
ifStatement(): IfStatementContext | undefined;
consoleStatement(): ConsoleStatementContext | undefined;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
variableDefinition(): VariableDefinitionContext;
tupleAssignment(): TupleAssignmentContext;
assignStatement(): AssignStatementContext;
timeOpStatement(): TimeOpStatementContext;
requireStatement(): RequireStatementContext;
ifStatement(): IfStatementContext;
consoleStatement(): ConsoleStatementContext;
get ruleIndex(): number;

@@ -264,8 +260,8 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class VariableDefinitionContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
typeName(): TypeNameContext;
Identifier(): TerminalNode;
expression(): ExpressionContext;
modifier(): ModifierContext[];
modifier_list(): ModifierContext[];
modifier(i: number): ModifierContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -275,8 +271,8 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class TupleAssignmentContext extends ParserRuleContext {
typeName(): TypeNameContext[];
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
typeName_list(): TypeNameContext[];
typeName(i: number): TypeNameContext;
Identifier(): TerminalNode[];
Identifier_list(): TerminalNode[];
Identifier(i: number): TerminalNode;
expression(): ExpressionContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -286,5 +282,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class AssignStatementContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
Identifier(): TerminalNode;
expression(): ExpressionContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -294,6 +290,6 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class TimeOpStatementContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
TxVar(): TerminalNode;
expression(): ExpressionContext;
StringLiteral(): TerminalNode | undefined;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
requireMessage(): RequireMessageContext;
get ruleIndex(): number;

@@ -303,5 +299,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class RequireStatementContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
expression(): ExpressionContext;
StringLiteral(): TerminalNode | undefined;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
requireMessage(): RequireMessageContext;
get ruleIndex(): number;

@@ -313,6 +309,6 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

_elseBlock: BlockContext;
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
expression(): ExpressionContext;
block(): BlockContext[];
block_list(): BlockContext[];
block(i: number): BlockContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -322,14 +318,17 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class ConsoleStatementContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
consoleParameterList(): ConsoleParameterListContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class RequireMessageContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
StringLiteral(): TerminalNode;
get ruleIndex(): number;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class ConsoleParameterContext extends ParserRuleContext {
Identifier(): TerminalNode | undefined;
StringLiteral(): TerminalNode | undefined;
NumberLiteral(): TerminalNode | undefined;
HexLiteral(): TerminalNode | undefined;
BooleanLiteral(): TerminalNode | undefined;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
Identifier(): TerminalNode;
literal(): LiteralContext;
get ruleIndex(): number;

@@ -339,5 +338,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class ConsoleParameterListContext extends ParserRuleContext {
consoleParameter(): ConsoleParameterContext[];
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
consoleParameter_list(): ConsoleParameterContext[];
consoleParameter(i: number): ConsoleParameterContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -347,5 +346,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class FunctionCallContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
Identifier(): TerminalNode;
expressionList(): ExpressionListContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -355,5 +354,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class ExpressionListContext extends ParserRuleContext {
expression(): ExpressionContext[];
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
expression_list(): ExpressionContext[];
expression(i: number): ExpressionContext;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;

@@ -363,83 +362,83 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class ExpressionContext extends ParserRuleContext {
constructor(parent: ParserRuleContext | undefined, invokingState: number);
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
get ruleIndex(): number;
copyFrom(ctx: ExpressionContext): void;
}
export declare class ParenthesisedContext extends ExpressionContext {
expression(): ExpressionContext;
constructor(ctx: ExpressionContext);
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class CastContext extends ExpressionContext {
_castable: ExpressionContext;
_size: ExpressionContext;
constructor(parser: CashScriptParser, ctx: ExpressionContext);
typeName(): TypeNameContext;
expression(): ExpressionContext[];
expression_list(): ExpressionContext[];
expression(i: number): ExpressionContext;
constructor(ctx: ExpressionContext);
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class FunctionCallExpressionContext extends ExpressionContext {
functionCall(): FunctionCallContext;
constructor(ctx: ExpressionContext);
export declare class UnaryIntrospectionOpContext extends ExpressionContext {
_scope: Token;
_op: Token;
constructor(parser: CashScriptParser, ctx: ExpressionContext);
expression(): ExpressionContext;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class InstantiationContext extends ExpressionContext {
Identifier(): TerminalNode;
expressionList(): ExpressionListContext;
constructor(ctx: ExpressionContext);
export declare class ArrayContext extends ExpressionContext {
constructor(parser: CashScriptParser, ctx: ExpressionContext);
expression_list(): ExpressionContext[];
expression(i: number): ExpressionContext;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class TupleIndexOpContext extends ExpressionContext {
_index: Token;
export declare class UnaryOpContext extends ExpressionContext {
_op: Token;
constructor(parser: CashScriptParser, ctx: ExpressionContext);
expression(): ExpressionContext;
NumberLiteral(): TerminalNode;
constructor(ctx: ExpressionContext);
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class UnaryIntrospectionOpContext extends ExpressionContext {
_scope: Token;
_op: Token;
expression(): ExpressionContext;
constructor(ctx: ExpressionContext);
export declare class IdentifierContext extends ExpressionContext {
constructor(parser: CashScriptParser, ctx: ExpressionContext);
Identifier(): TerminalNode;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class UnaryOpContext extends ExpressionContext {
_op: Token;
export declare class LiteralExpressionContext extends ExpressionContext {
constructor(parser: CashScriptParser, ctx: ExpressionContext);
literal(): LiteralContext;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class TupleIndexOpContext extends ExpressionContext {
_index: Token;
constructor(parser: CashScriptParser, ctx: ExpressionContext);
expression(): ExpressionContext;
constructor(ctx: ExpressionContext);
NumberLiteral(): TerminalNode;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class BinaryOpContext extends ExpressionContext {
_left: ExpressionContext;
_op: Token;
_right: ExpressionContext;
expression(): ExpressionContext[];
expression(i: number): ExpressionContext;
constructor(ctx: ExpressionContext);
export declare class InstantiationContext extends ExpressionContext {
constructor(parser: CashScriptParser, ctx: ExpressionContext);
Identifier(): TerminalNode;
expressionList(): ExpressionListContext;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class ArrayContext extends ExpressionContext {
expression(): ExpressionContext[];
expression(i: number): ExpressionContext;
constructor(ctx: ExpressionContext);
export declare class FunctionCallExpressionContext extends ExpressionContext {
constructor(parser: CashScriptParser, ctx: ExpressionContext);
functionCall(): FunctionCallContext;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class NullaryOpContext extends ExpressionContext {
constructor(parser: CashScriptParser, ctx: ExpressionContext);
NullaryOp(): TerminalNode;
constructor(ctx: ExpressionContext);
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class IdentifierContext extends ExpressionContext {
Identifier(): TerminalNode;
constructor(ctx: ExpressionContext);
export declare class ParenthesisedContext extends ExpressionContext {
constructor(parser: CashScriptParser, ctx: ExpressionContext);
expression(): ExpressionContext;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class LiteralExpressionContext extends ExpressionContext {
literal(): LiteralContext;
constructor(ctx: ExpressionContext);
export declare class BinaryOpContext extends ExpressionContext {
_left: ExpressionContext;
_op: Token;
_right: ExpressionContext;
constructor(parser: CashScriptParser, ctx: ExpressionContext);
expression_list(): ExpressionContext[];
expression(i: number): ExpressionContext;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}
export declare class ModifierContext extends ParserRuleContext {
constructor(parent: ParserRuleContext | undefined, invokingState: number);
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
get ruleIndex(): number;

@@ -449,8 +448,8 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class LiteralContext extends ParserRuleContext {
BooleanLiteral(): TerminalNode | undefined;
numberLiteral(): NumberLiteralContext | undefined;
StringLiteral(): TerminalNode | undefined;
DateLiteral(): TerminalNode | undefined;
HexLiteral(): TerminalNode | undefined;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
BooleanLiteral(): TerminalNode;
numberLiteral(): NumberLiteralContext;
StringLiteral(): TerminalNode;
DateLiteral(): TerminalNode;
HexLiteral(): TerminalNode;
get ruleIndex(): number;

@@ -460,5 +459,5 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class NumberLiteralContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
NumberLiteral(): TerminalNode;
NumberUnit(): TerminalNode | undefined;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
NumberUnit(): TerminalNode;
get ruleIndex(): number;

@@ -468,6 +467,6 @@ accept<Result>(visitor: CashScriptVisitor<Result>): Result;

export declare class TypeNameContext extends ParserRuleContext {
constructor(parser?: CashScriptParser, parent?: ParserRuleContext, invokingState?: number);
Bytes(): TerminalNode;
constructor(parent: ParserRuleContext | undefined, invokingState: number);
get ruleIndex(): number;
accept<Result>(visitor: CashScriptVisitor<Result>): Result;
}

@@ -1,14 +0,2 @@

import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor.js";
import { ParenthesisedContext } from "./CashScriptParser.js";
import { CastContext } from "./CashScriptParser.js";
import { FunctionCallExpressionContext } from "./CashScriptParser.js";
import { InstantiationContext } from "./CashScriptParser.js";
import { TupleIndexOpContext } from "./CashScriptParser.js";
import { UnaryIntrospectionOpContext } from "./CashScriptParser.js";
import { UnaryOpContext } from "./CashScriptParser.js";
import { BinaryOpContext } from "./CashScriptParser.js";
import { ArrayContext } from "./CashScriptParser.js";
import { NullaryOpContext } from "./CashScriptParser.js";
import { IdentifierContext } from "./CashScriptParser.js";
import { LiteralExpressionContext } from "./CashScriptParser.js";
import { ParseTreeVisitor } from 'antlr4';
import { SourceFileContext } from "./CashScriptParser.js";

@@ -33,2 +21,3 @@ import { PragmaDirectiveContext } from "./CashScriptParser.js";

import { ConsoleStatementContext } from "./CashScriptParser.js";
import { RequireMessageContext } from "./CashScriptParser.js";
import { ConsoleParameterContext } from "./CashScriptParser.js";

@@ -38,3 +27,14 @@ import { ConsoleParameterListContext } from "./CashScriptParser.js";

import { ExpressionListContext } from "./CashScriptParser.js";
import { ExpressionContext } from "./CashScriptParser.js";
import { CastContext } from "./CashScriptParser.js";
import { UnaryIntrospectionOpContext } from "./CashScriptParser.js";
import { ArrayContext } from "./CashScriptParser.js";
import { UnaryOpContext } from "./CashScriptParser.js";
import { IdentifierContext } from "./CashScriptParser.js";
import { LiteralExpressionContext } from "./CashScriptParser.js";
import { TupleIndexOpContext } from "./CashScriptParser.js";
import { InstantiationContext } from "./CashScriptParser.js";
import { FunctionCallExpressionContext } from "./CashScriptParser.js";
import { NullaryOpContext } from "./CashScriptParser.js";
import { ParenthesisedContext } from "./CashScriptParser.js";
import { BinaryOpContext } from "./CashScriptParser.js";
import { ModifierContext } from "./CashScriptParser.js";

@@ -51,231 +51,231 @@ import { LiteralContext } from "./CashScriptParser.js";

*/
export interface CashScriptVisitor<Result> extends ParseTreeVisitor<Result> {
export default class CashScriptVisitor<Result> extends ParseTreeVisitor<Result> {
/**
* Visit a parse tree produced by the `Parenthesised`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.sourceFile`.
* @param ctx the parse tree
* @return the visitor result
*/
visitParenthesised?: (ctx: ParenthesisedContext) => Result;
visitSourceFile?: (ctx: SourceFileContext) => Result;
/**
* Visit a parse tree produced by the `Cast`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.pragmaDirective`.
* @param ctx the parse tree
* @return the visitor result
*/
visitCast?: (ctx: CastContext) => Result;
visitPragmaDirective?: (ctx: PragmaDirectiveContext) => Result;
/**
* Visit a parse tree produced by the `FunctionCallExpression`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.pragmaName`.
* @param ctx the parse tree
* @return the visitor result
*/
visitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => Result;
visitPragmaName?: (ctx: PragmaNameContext) => Result;
/**
* Visit a parse tree produced by the `Instantiation`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.pragmaValue`.
* @param ctx the parse tree
* @return the visitor result
*/
visitInstantiation?: (ctx: InstantiationContext) => Result;
visitPragmaValue?: (ctx: PragmaValueContext) => Result;
/**
* Visit a parse tree produced by the `TupleIndexOp`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.versionConstraint`.
* @param ctx the parse tree
* @return the visitor result
*/
visitTupleIndexOp?: (ctx: TupleIndexOpContext) => Result;
visitVersionConstraint?: (ctx: VersionConstraintContext) => Result;
/**
* Visit a parse tree produced by the `UnaryIntrospectionOp`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.versionOperator`.
* @param ctx the parse tree
* @return the visitor result
*/
visitUnaryIntrospectionOp?: (ctx: UnaryIntrospectionOpContext) => Result;
visitVersionOperator?: (ctx: VersionOperatorContext) => Result;
/**
* Visit a parse tree produced by the `UnaryOp`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.contractDefinition`.
* @param ctx the parse tree
* @return the visitor result
*/
visitUnaryOp?: (ctx: UnaryOpContext) => Result;
visitContractDefinition?: (ctx: ContractDefinitionContext) => Result;
/**
* Visit a parse tree produced by the `BinaryOp`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.functionDefinition`.
* @param ctx the parse tree
* @return the visitor result
*/
visitBinaryOp?: (ctx: BinaryOpContext) => Result;
visitFunctionDefinition?: (ctx: FunctionDefinitionContext) => Result;
/**
* Visit a parse tree produced by the `Array`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.parameterList`.
* @param ctx the parse tree
* @return the visitor result
*/
visitArray?: (ctx: ArrayContext) => Result;
visitParameterList?: (ctx: ParameterListContext) => Result;
/**
* Visit a parse tree produced by the `NullaryOp`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.parameter`.
* @param ctx the parse tree
* @return the visitor result
*/
visitNullaryOp?: (ctx: NullaryOpContext) => Result;
visitParameter?: (ctx: ParameterContext) => Result;
/**
* Visit a parse tree produced by the `Identifier`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.block`.
* @param ctx the parse tree
* @return the visitor result
*/
visitIdentifier?: (ctx: IdentifierContext) => Result;
visitBlock?: (ctx: BlockContext) => Result;
/**
* Visit a parse tree produced by the `LiteralExpression`
* labeled alternative in `CashScriptParser.expression`.
* Visit a parse tree produced by `CashScriptParser.statement`.
* @param ctx the parse tree
* @return the visitor result
*/
visitLiteralExpression?: (ctx: LiteralExpressionContext) => Result;
visitStatement?: (ctx: StatementContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.sourceFile`.
* Visit a parse tree produced by `CashScriptParser.variableDefinition`.
* @param ctx the parse tree
* @return the visitor result
*/
visitSourceFile?: (ctx: SourceFileContext) => Result;
visitVariableDefinition?: (ctx: VariableDefinitionContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.pragmaDirective`.
* Visit a parse tree produced by `CashScriptParser.tupleAssignment`.
* @param ctx the parse tree
* @return the visitor result
*/
visitPragmaDirective?: (ctx: PragmaDirectiveContext) => Result;
visitTupleAssignment?: (ctx: TupleAssignmentContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.pragmaName`.
* Visit a parse tree produced by `CashScriptParser.assignStatement`.
* @param ctx the parse tree
* @return the visitor result
*/
visitPragmaName?: (ctx: PragmaNameContext) => Result;
visitAssignStatement?: (ctx: AssignStatementContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.pragmaValue`.
* Visit a parse tree produced by `CashScriptParser.timeOpStatement`.
* @param ctx the parse tree
* @return the visitor result
*/
visitPragmaValue?: (ctx: PragmaValueContext) => Result;
visitTimeOpStatement?: (ctx: TimeOpStatementContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.versionConstraint`.
* Visit a parse tree produced by `CashScriptParser.requireStatement`.
* @param ctx the parse tree
* @return the visitor result
*/
visitVersionConstraint?: (ctx: VersionConstraintContext) => Result;
visitRequireStatement?: (ctx: RequireStatementContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.versionOperator`.
* Visit a parse tree produced by `CashScriptParser.ifStatement`.
* @param ctx the parse tree
* @return the visitor result
*/
visitVersionOperator?: (ctx: VersionOperatorContext) => Result;
visitIfStatement?: (ctx: IfStatementContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.contractDefinition`.
* Visit a parse tree produced by `CashScriptParser.consoleStatement`.
* @param ctx the parse tree
* @return the visitor result
*/
visitContractDefinition?: (ctx: ContractDefinitionContext) => Result;
visitConsoleStatement?: (ctx: ConsoleStatementContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.functionDefinition`.
* Visit a parse tree produced by `CashScriptParser.requireMessage`.
* @param ctx the parse tree
* @return the visitor result
*/
visitFunctionDefinition?: (ctx: FunctionDefinitionContext) => Result;
visitRequireMessage?: (ctx: RequireMessageContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.parameterList`.
* Visit a parse tree produced by `CashScriptParser.consoleParameter`.
* @param ctx the parse tree
* @return the visitor result
*/
visitParameterList?: (ctx: ParameterListContext) => Result;
visitConsoleParameter?: (ctx: ConsoleParameterContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.parameter`.
* Visit a parse tree produced by `CashScriptParser.consoleParameterList`.
* @param ctx the parse tree
* @return the visitor result
*/
visitParameter?: (ctx: ParameterContext) => Result;
visitConsoleParameterList?: (ctx: ConsoleParameterListContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.block`.
* Visit a parse tree produced by `CashScriptParser.functionCall`.
* @param ctx the parse tree
* @return the visitor result
*/
visitBlock?: (ctx: BlockContext) => Result;
visitFunctionCall?: (ctx: FunctionCallContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.statement`.
* Visit a parse tree produced by `CashScriptParser.expressionList`.
* @param ctx the parse tree
* @return the visitor result
*/
visitStatement?: (ctx: StatementContext) => Result;
visitExpressionList?: (ctx: ExpressionListContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.variableDefinition`.
* Visit a parse tree produced by the `Cast`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitVariableDefinition?: (ctx: VariableDefinitionContext) => Result;
visitCast?: (ctx: CastContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.tupleAssignment`.
* Visit a parse tree produced by the `UnaryIntrospectionOp`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitTupleAssignment?: (ctx: TupleAssignmentContext) => Result;
visitUnaryIntrospectionOp?: (ctx: UnaryIntrospectionOpContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.assignStatement`.
* Visit a parse tree produced by the `Array`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitAssignStatement?: (ctx: AssignStatementContext) => Result;
visitArray?: (ctx: ArrayContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.timeOpStatement`.
* Visit a parse tree produced by the `UnaryOp`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitTimeOpStatement?: (ctx: TimeOpStatementContext) => Result;
visitUnaryOp?: (ctx: UnaryOpContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.requireStatement`.
* Visit a parse tree produced by the `Identifier`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitRequireStatement?: (ctx: RequireStatementContext) => Result;
visitIdentifier?: (ctx: IdentifierContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.ifStatement`.
* Visit a parse tree produced by the `LiteralExpression`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitIfStatement?: (ctx: IfStatementContext) => Result;
visitLiteralExpression?: (ctx: LiteralExpressionContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.consoleStatement`.
* Visit a parse tree produced by the `TupleIndexOp`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitConsoleStatement?: (ctx: ConsoleStatementContext) => Result;
visitTupleIndexOp?: (ctx: TupleIndexOpContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.consoleParameter`.
* Visit a parse tree produced by the `Instantiation`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitConsoleParameter?: (ctx: ConsoleParameterContext) => Result;
visitInstantiation?: (ctx: InstantiationContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.consoleParameterList`.
* Visit a parse tree produced by the `FunctionCallExpression`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitConsoleParameterList?: (ctx: ConsoleParameterListContext) => Result;
visitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.functionCall`.
* Visit a parse tree produced by the `NullaryOp`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitFunctionCall?: (ctx: FunctionCallContext) => Result;
visitNullaryOp?: (ctx: NullaryOpContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.expressionList`.
* Visit a parse tree produced by the `Parenthesised`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitExpressionList?: (ctx: ExpressionListContext) => Result;
visitParenthesised?: (ctx: ParenthesisedContext) => Result;
/**
* Visit a parse tree produced by `CashScriptParser.expression`.
* Visit a parse tree produced by the `BinaryOp`
* labeled alternative in `CashScriptParser.expression`.
* @param ctx the parse tree
* @return the visitor result
*/
visitExpression?: (ctx: ExpressionContext) => Result;
visitBinaryOp?: (ctx: BinaryOpContext) => Result;
/**

@@ -282,0 +282,0 @@ * Visit a parse tree produced by `CashScriptParser.modifier`.

@@ -1,3 +0,12 @@

// Generated from src/grammar/CashScript.g4 by ANTLR 4.9.0-SNAPSHOT
export {};
// Generated from src/grammar/CashScript.g4 by ANTLR 4.13.1
import { ParseTreeVisitor } from 'antlr4';
/**
* This interface defines a complete generic visitor for a parse tree produced
* by `CashScriptParser`.
*
* @param <Result> The return type of the visit operation. Use `void` for
* operations with no return type.
*/
export default class CashScriptVisitor extends ParseTreeVisitor {
}
//# sourceMappingURL=CashScriptVisitor.js.map
export * from './Errors.js';
export * as utils from '@cashscript/utils';
export { compileFile, compileString } from './compiler.js';
export declare const version = "0.10.0-next.2";
export declare const version = "0.10.0-next.3";
export * from './Errors.js';
export * as utils from '@cashscript/utils';
export { compileFile, compileString } from './compiler.js';
export const version = '0.10.0-next.2';
export const version = '0.10.0-next.3';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { Node, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode } from '../ast/AST.js';
import { Node, ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, AssignNode, IdentifierNode, BranchNode, CastNode, FunctionCallNode, UnaryOpNode, BinaryOpNode, BoolLiteralNode, IntLiteralNode, HexLiteralNode, StringLiteralNode, BlockNode, TimeOpNode, ArrayNode, TupleIndexOpNode, RequireNode, InstantiationNode, TupleAssignmentNode, NullaryOpNode, ConsoleStatementNode } from '../ast/AST.js';
import AstTraversal from '../ast/AstTraversal.js';

@@ -21,2 +21,3 @@ export default class OutputSourceCodeTraversal extends AstTraversal {

visitBranch(node: BranchNode): Node;
visitConsoleStatement(node: ConsoleStatementNode): Node;
visitBlock(node: BlockNode): Node;

@@ -23,0 +24,0 @@ visitCast(node: CastNode): Node;

@@ -91,2 +91,5 @@ import { binToHex } from '@bitauth/libauth';

node.expression = this.visit(node.expression);
if (node.message) {
this.addOutput(`, "${node.message}"`);
}
this.addOutput(');\n');

@@ -107,2 +110,8 @@ return node;

}
visitConsoleStatement(node) {
this.addOutput('console.log(', true);
node.parameters = this.visitCommaList(node.parameters);
this.addOutput(');\n');
return node;
}
visitBlock(node) {

@@ -109,0 +118,0 @@ this.addOutput('{');

@@ -1,4 +0,3 @@

import { ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, IdentifierNode, BlockNode, Node, FunctionCallNode, InstantiationNode, AssignNode, TupleAssignmentNode, ConsoleStatementNode } from '../ast/AST.js';
import { ContractNode, ParameterNode, VariableDefinitionNode, FunctionDefinitionNode, IdentifierNode, BlockNode, Node, FunctionCallNode, InstantiationNode, AssignNode, TupleAssignmentNode } from '../ast/AST.js';
import AstTraversal from '../ast/AstTraversal.js';
import { Symbol } from '../ast/SymbolTable.js';
export default class SymbolTableTraversal extends AstTraversal {

@@ -9,3 +8,2 @@ private symbolTables;

private expectedSymbolType;
logSymbols: Symbol[];
visitContract(node: ContractNode): Node;

@@ -21,3 +19,2 @@ visitParameter(node: ParameterNode): Node;

visitIdentifier(node: IdentifierNode): Node;
visitConsoleStatement(node: ConsoleStatementNode): ConsoleStatementNode;
}

@@ -12,3 +12,2 @@ import { GLOBAL_SYMBOL_TABLE, Modifier } from '../ast/Globals.js';

this.expectedSymbolType = SymbolType.VARIABLE;
this.logSymbols = [];
}

@@ -121,12 +120,3 @@ visitContract(node) {

}
visitConsoleStatement(node) {
// there might be same-name symbols in different code scopes
// so we collect all symbols with their location, which will be analyzed later
const symbols = node.parameters
.map((parameter) => this.symbolTables[0].get(parameter.identifier))
.filter((symbol) => symbol);
this.logSymbols.push(...symbols);
return node;
}
}
//# sourceMappingURL=SymbolTableTraversal.js.map
{
"name": "cashc",
"version": "0.10.0-next.2",
"version": "0.10.0-next.3",
"description": "Compile Bitcoin Cash contracts to Bitcoin Cash Script or artifacts",

@@ -37,4 +37,4 @@ "keywords": [

"scripts": {
"antlr": "antlr4ts -visitor -no-listener src/grammar/CashScript.g4",
"postantlr": "find src/grammar -type f -name '*.ts' | xargs sed -i '' 's|\\(import .* \".*/.*\\)\";|\\1\\.js\";|g'",
"antlr": "antlr -Dlanguage=TypeScript -visitor -no-listener src/grammar/CashScript.g4",
"postantlr": "find src/grammar -type f -name 'CashScriptVisitor.ts' | xargs sed -i '' 's|\\(import .* \".*/.*\\)\";|\\1\\.js\";|g'",
"build": "yarn clean && yarn compile",

@@ -53,7 +53,7 @@ "build:test": "yarn clean:test && yarn compile:test && cpy './test/**/*.cash' ./dist-test/test",

"dependencies": {
"@bitauth/libauth": "^2.0.0-alpha.8",
"@cashscript/utils": "^0.10.0-next.2",
"antlr4ts": "^0.5.0-alpha.4",
"@bitauth/libauth": "^2.0.0",
"@cashscript/utils": "^0.10.0-next.3",
"antlr4": "^4.13.1-patch-1",
"commander": "^7.1.0",
"semver": "^7.3.4"
"semver": "^7.5.4"
},

@@ -64,3 +64,2 @@ "devDependencies": {

"@types/semver": "^7.3.4",
"antlr4ts-cli": "^0.5.0-alpha.4",
"cpy-cli": "^4.2.0",

@@ -72,3 +71,3 @@ "eslint": "^8.54.0",

},
"gitHead": "23f2f6fc78f6a911dfe559404be7741aa824e791"
"gitHead": "1b66bdb92f972d311d968667290e96085d7fcdc7"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc