ifc-expressions
Version:
Parsing and evaluation of IFC expressions
26 lines (25 loc) • 1.22 kB
TypeScript
import { ParserRuleContext } from "antlr4";
import { ExprType } from "../type/ExprType.js";
export declare class TypeManager {
private readonly types;
constructor();
setType(parserRuleContext: ParserRuleContext, type: ExprType): void;
getType(parserRuleContext: ParserRuleContext): ExprType;
copyTypeFrom(ctx: ParserRuleContext, from: ParserRuleContext): void;
requireString(ctx: ParserRuleContext): void;
requireBoolean(ctx: ParserRuleContext): void;
requireLogicalOrBoolean(ctx: ParserRuleContext): void;
requireOneOf(ctx: ParserRuleContext, ...types: Array<ExprType>): void;
requireNumeric(ctx: ParserRuleContext): void;
requireTypesOverlap(ctxA: ParserRuleContext, ctxB: ParserRuleContext): void;
isType(type: ExprType, ...ctxs: any[]): boolean;
overlapsWith(type: ExprType, ...ctxs: any[]): boolean;
isString(...ctxs: any[]): boolean;
overlapsWithString(...ctxs: any[]): boolean;
isBoolean(...ctxs: any[]): boolean;
isLogical(...ctxs: any[]): boolean;
overlapsWithBoolean(...ctxs: any[]): boolean;
overlapsWithLogical(...ctxs: any[]): boolean;
isNumeric(...ctxs: any[]): boolean;
overlapsWithNumeric(...ctxs: any[]): boolean;
}