Updated tsd for compiler passes [ci skip]
This commit is contained in:
parent
fde1c480f4
commit
93f9068c99
11
lib/typings/api.d.ts
vendored
11
lib/typings/api.d.ts
vendored
|
@ -90,10 +90,6 @@ declare namespace peg {
|
|||
name: string;
|
||||
expression: Named | Expression;
|
||||
|
||||
// Added by bytecode generator
|
||||
|
||||
bytecode?: number[];
|
||||
|
||||
// Added by calc-report-failures pass
|
||||
|
||||
reportFailures?: boolean;
|
||||
|
@ -102,6 +98,10 @@ declare namespace peg {
|
|||
|
||||
match?: number;
|
||||
|
||||
// Added by generate-bytecode pass
|
||||
|
||||
bytecode?: number[];
|
||||
|
||||
}
|
||||
|
||||
interface Named extends INode {
|
||||
|
@ -348,12 +348,13 @@ declare namespace peg {
|
|||
namespace transform {
|
||||
|
||||
function removeProxyRules( ast: Grammar, options: ICompilerPassOptions ): void;
|
||||
function calcReportFailures( ast: Grammar, options: ICompilerPassOptions ): void;
|
||||
|
||||
}
|
||||
|
||||
namespace generate {
|
||||
|
||||
function calcReportFailures( ast: Grammar, options: ICompilerPassOptions ): void;
|
||||
function inferenceMatchResult( ast: Grammar ): void;
|
||||
function generateBytecode( ast: Grammar ): void;
|
||||
function generateJS( ast: Grammar, options: ICompilerPassOptions ): void;
|
||||
|
||||
|
|
12
lib/typings/modules.d.ts
vendored
12
lib/typings/modules.d.ts
vendored
|
@ -74,6 +74,12 @@ declare module "pegjs/lib/compiler/visitor" {
|
|||
|
||||
}
|
||||
|
||||
declare module "pegjs/lib/compiler/passes/calc-report-failures" {
|
||||
|
||||
export default peg.compiler.passes.generate.calcReportFailures;
|
||||
|
||||
}
|
||||
|
||||
declare module "pegjs/lib/compiler/passes/generate-bytecode" {
|
||||
|
||||
export default peg.compiler.passes.generate.generateBytecode;
|
||||
|
@ -86,6 +92,12 @@ declare module "pegjs/lib/compiler/passes/generate-js" {
|
|||
|
||||
}
|
||||
|
||||
declare module "pegjs/lib/compiler/passes/inference-match-result" {
|
||||
|
||||
export default peg.compiler.passes.generate.inferenceMatchResult;
|
||||
|
||||
}
|
||||
|
||||
declare module "pegjs/lib/compiler/passes/remove-proxy-rules" {
|
||||
|
||||
export default peg.compiler.passes.transform.removeProxyRules;
|
||||
|
|
Loading…
Reference in a new issue