SourceTermAnalysisSystem_vue/node_modules/jsonc-eslint-parser/lib/parser/convert.d.ts
2026-05-15 10:22:44 +08:00

18 lines
720 B
TypeScript

import type { Node } from "estree";
import type { AST } from "eslint";
import type { JSONNode, JSONProgram } from "./ast";
import type { TokenStore } from "./token-store";
import type { Token as AcornToken } from "acorn";
import type { JSONSyntaxContext } from "./syntax-context";
export declare class TokenConvertor {
private readonly ctx;
private readonly code;
private readonly templateBuffer;
private readonly tokTypes;
constructor(ctx: JSONSyntaxContext, code: string);
convertToken(token: AcornToken & {
value: any;
}): AST.Token | null;
}
export declare function convertProgramNode(node: Node | JSONNode, tokens: TokenStore, ctx: JSONSyntaxContext, code: string): JSONProgram;