@maniascript/parser
Version:
Maniascript parser
26 lines (25 loc) • 577 B
TypeScript
import { type ParseTree, ParserRuleContext } from 'antlr4ng';
declare enum TypeKind {
Unknown = 0,
Text = 1,
Integer = 2,
Real = 3,
Boolean = 4,
Ident = 5,
Vec2 = 6,
Int2 = 7,
Vec3 = 8,
Int3 = 9,
Enum = 10,
Class = 11,
Array = 12,
Structure = 13,
Void = 14
}
interface Type {
kind: TypeKind;
name: string;
}
declare function getUnknownType(): Type;
declare function deduceTypeFromContext(ctx: ParserRuleContext | ParseTree | null): Type;
export { type Type, getUnknownType, deduceTypeFromContext, TypeKind };