/** * The compiler's own answers about X++, as a queryable surface. * * Everything here comes from `eval/compiler-facts.snapshot.json`, captured on a VM * by `scripts/capture-compiler-facts.ts` from the shipped compiler: * - reserved words → XppParser.Keywords.KeywordHashSet (reflection) * - intrinsics → XppCompiler.Intrinsics.IntrinsicFunctionInfo (reflection) * - run-time arities → xppc probe builds ("expects N argument(s)" / "is missing * argument K"), so optional trailing parameters are visible * as a min/max range rather than guessed * * Rules and knowledge read from here instead of carrying their own copy of a list. * The reason is a measured one: the hand-maintained arity table said date2Str took * 8 arguments and the shipped platform calls it with 7 (161 times), while the * language reference says `*=` does not exist and the platform ships 57 uses. * A table that is not the compiler's own drifts from it. * * tests/knowledge/compilerFacts.test.ts fails when the generated module and the * snapshot disagree, or when a validator table contradicts either. */ import { COMPILER_FACTS_CAPTURED_AT, COMPILER_VERSION, XPP_EXEMPTED_KEYWORDS, XPP_INTRINSICS, XPP_KEYWORDS, XPP_OBSOLETE_FUNCTIONS, XPP_RUNTIME_FUNCTIONS, XPP_UNKNOWN_FUNCTIONS } from './compilerFacts.generated.js'; export { COMPILER_FACTS_CAPTURED_AT, COMPILER_VERSION, XPP_EXEMPTED_KEYWORDS, XPP_INTRINSICS, XPP_KEYWORDS, XPP_OBSOLETE_FUNCTIONS, XPP_RUNTIME_FUNCTIONS, XPP_UNKNOWN_FUNCTIONS, }; export interface RuntimeArity { min: number; max: number | 'variadic'; } /** * True when `word` is a reserved word the parser will not accept as an identifier. * X++ is case-insensitive. `in` is reserved but exempted, so it is NOT reported. */ export declare function isReservedKeyword(word: string): boolean; /** Canonical spelling + argument count of an intrinsic, or null when it is not one. */ export declare function intrinsicInfo(name: string): { name: string; args: number; } | null; /** Canonical spelling + accepted argument counts of a run-time function, or null. */ export declare function runtimeFunctionInfo(name: string): { name: string; arity: RuntimeArity; } | null; /** True when the compiler accepts `count` arguments for this run-time function. */ export declare function acceptsArgumentCount(arity: RuntimeArity, count: number): boolean; /** How the compiler describes the accepted argument counts, for a fix message. */ export declare function describeArity(arity: RuntimeArity): string; /** A name that looks predefined but does not exist on this platform version. */ export declare function isUnknownFunction(name: string): boolean; /** A predefined function the compiler reports as obsolete. */ export declare function isObsoleteFunction(name: string): boolean; //# sourceMappingURL=compilerFacts.d.ts.map