@bscotch/gml-parser
Version:
A parser for GML (GameMaker Language) files for programmatic manipulation and analysis of GameMaker projects.
32 lines • 1.4 kB
TypeScript
import type { IRecognitionException, IToken } from 'chevrotain';
import type { IRange, Range } from './project.location.js';
export type GmlParseError = IRecognitionException & {
previousToken?: IToken;
};
export type DiagnosticSeverity = 'error' | 'warning' | 'info';
export interface DiagnosticCollections {
GLOBAL_SELF: Diagnostic[];
INVALID_OPERATION: Diagnostic[];
JSDOC_MISMATCH: Diagnostic[];
MISSING_EVENT_INHERITED: Diagnostic[];
MISSING_REQUIRED_ARGUMENT: Diagnostic[];
SYNTAX_ERROR: Diagnostic[];
TOO_MANY_ARGUMENTS: Diagnostic[];
UNDECLARED_VARIABLE_REFERENCE: Diagnostic[];
UNDECLARED_GLOBAL_REFERENCE: Diagnostic[];
JSDOC: Diagnostic[];
UNUSED: Diagnostic[];
}
export type DiagnosticCollectionName = keyof DiagnosticCollections;
export declare class Diagnostic {
readonly message: string;
readonly location: IRange;
readonly severity: DiagnosticSeverity;
readonly payload?: any | undefined;
readonly $tag = "diagnostic";
constructor(message: string, location: IRange, severity?: DiagnosticSeverity, payload?: any | undefined);
static warn(message: string, location: Range, payload?: any): Diagnostic;
static error(message: string, location: Range, payload?: any): Diagnostic;
static info(message: string, location: Range, payload?: any): Diagnostic;
}
//# sourceMappingURL=project.diagnostics.d.ts.map