time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

parse.d.ts (689B)


      1 import { LocationRange } from "peggy";
      2 import { result } from "../utility/result.js";
      3 import { type ASTCommentNode, type ASTNode } from "./peggyHelpers.js";
      4 export { type ASTNode } from "./peggyHelpers.js";
      5 import { ICompileError } from "../errors/IError.js";
      6 export type ParseError = {
      7     type: "SyntaxError";
      8     location: LocationRange;
      9     message: string;
     10 };
     11 export type AST = Extract<ASTNode, {
     12     type: "Program";
     13 }> & {
     14     comments: ASTCommentNode[];
     15 };
     16 type ParseResult = result<AST, ICompileError>;
     17 export declare function parse(expr: string, source: string): ParseResult;
     18 export declare function nodeResultToString(r: ParseResult): string;
     19 //# sourceMappingURL=parse.d.ts.map