/****************************************************************************** * This file was generated by langium-cli 3.3.0. * DO NOT EDIT MANUALLY! ******************************************************************************/ import type { AstNode, Reference, ReferenceInfo, TypeMetaData } from 'langium'; import { AbstractAstReflection } from 'langium'; export declare const ArithmeticsTerminals: { WS: RegExp; ID: RegExp; NUMBER: RegExp; ML_COMMENT: RegExp; SL_COMMENT: RegExp; }; export type ArithmeticsTerminalNames = keyof typeof ArithmeticsTerminals; export type ArithmeticsKeywordNames = "%" | "(" | ")" | "*" | "+" | "," | "-" | "/" | ":" | ";" | "^" | "def" | "module"; export type ArithmeticsTokenNames = ArithmeticsTerminalNames | ArithmeticsKeywordNames; export type AbstractDefinition = DeclaredParameter | Definition; export declare const AbstractDefinition = "AbstractDefinition"; export declare function isAbstractDefinition(item: unknown): item is AbstractDefinition; export type Expression = BinaryExpression | FunctionCall | NumberLiteral; export declare const Expression = "Expression"; export declare function isExpression(item: unknown): item is Expression; export type Statement = Definition | Evaluation; export declare const Statement = "Statement"; export declare function isStatement(item: unknown): item is Statement; export interface BinaryExpression extends AstNode { readonly $container: BinaryExpression | Definition | Evaluation | FunctionCall; readonly $type: 'BinaryExpression'; left: Expression; operator: '%' | '*' | '+' | '-' | '/' | '^'; right: Expression; } export declare const BinaryExpression = "BinaryExpression"; export declare function isBinaryExpression(item: unknown): item is BinaryExpression; export interface DeclaredParameter extends AstNode { readonly $container: Definition; readonly $type: 'DeclaredParameter'; name: string; } export declare const DeclaredParameter = "DeclaredParameter"; export declare function isDeclaredParameter(item: unknown): item is DeclaredParameter; export interface Definition extends AstNode { readonly $container: Module; readonly $type: 'Definition'; args: Array; expr: Expression; name: string; } export declare const Definition = "Definition"; export declare function isDefinition(item: unknown): item is Definition; export interface Evaluation extends AstNode { readonly $container: Module; readonly $type: 'Evaluation'; expression: Expression; } export declare const Evaluation = "Evaluation"; export declare function isEvaluation(item: unknown): item is Evaluation; export interface FunctionCall extends AstNode { readonly $container: BinaryExpression | Definition | Evaluation | FunctionCall; readonly $type: 'FunctionCall'; args: Array; func: Reference; } export declare const FunctionCall = "FunctionCall"; export declare function isFunctionCall(item: unknown): item is FunctionCall; export interface Module extends AstNode { readonly $type: 'Module'; name: string; statements: Array; } export declare const Module = "Module"; export declare function isModule(item: unknown): item is Module; export interface NumberLiteral extends AstNode { readonly $container: BinaryExpression | Definition | Evaluation | FunctionCall; readonly $type: 'NumberLiteral'; value: number; } export declare const NumberLiteral = "NumberLiteral"; export declare function isNumberLiteral(item: unknown): item is NumberLiteral; export type ArithmeticsAstType = { AbstractDefinition: AbstractDefinition; BinaryExpression: BinaryExpression; DeclaredParameter: DeclaredParameter; Definition: Definition; Evaluation: Evaluation; Expression: Expression; FunctionCall: FunctionCall; Module: Module; NumberLiteral: NumberLiteral; Statement: Statement; }; export declare class ArithmeticsAstReflection extends AbstractAstReflection { getAllTypes(): string[]; protected computeIsSubtype(subtype: string, supertype: string): boolean; getReferenceType(refInfo: ReferenceInfo): string; getTypeMetaData(type: string): TypeMetaData; } export declare const reflection: ArithmeticsAstReflection; //# sourceMappingURL=ast.d.ts.map