You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

15 lines
690 B

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): AST.Token | null;
}
export declare function convertProgramNode(node: Node | JSONNode, tokens: TokenStore, ctx: JSONSyntaxContext, code: string): JSONProgram;