UNPKG

@iotize/tap-scripts

Version:

IoTize Tap scripts

32 lines (31 loc) 1.53 kB
import { ParserRuleContext } from 'antlr4ts/ParserRuleContext'; import { IoTizeTestParser } from './antlr4/IoTizeTestParser'; import { InstructionInterface } from './instructions'; export declare enum ScriptErrorCode { InternalError = "InternalError", InvalidRunState = "InvalidRunState", EndWithErrorCode = "EndWithErrorCode", InstructionNotImplemented = "InstructionNotImplemented", ScriptSynthaxError = "ScriptSynthaxError", InstructionPartiallyImplemented = "InstructionPartiallyImplemented", InstructionExecError = "InstructionExecError" } export declare class ScriptError extends Error { code: ScriptErrorCode; constructor(code: ScriptErrorCode, msg: string); static instructionExecError(err: Error, context?: ParserRuleContext): ScriptError; static instructionPartiallyImplemented(instruction: InstructionInterface<any>, msg: string): ScriptError; static internalError(message: string): ScriptError; static invalidRunState(message: string): ScriptError; static instructionNotImplementedYet(ctx: ParserRuleContext, msg?: string): void; static syntaxError(parser: IoTizeTestParser): void; static endWithErrorCode(resultCode: number): ScriptEndWithErrorCodeError; } export declare class ScriptEndWithErrorCodeError extends ScriptError { errorCode: number; constructor(errorCode: number); } export declare class ScriptSyntaxeError extends ScriptError { parser: IoTizeTestParser; constructor(parser: IoTizeTestParser); }