Updated tsd for compiler passes [ci skip]

This commit is contained in:
Futago-za Ryuu 2018-01-07 01:08:35 +00:00
parent fde1c480f4
commit 93f9068c99
2 changed files with 18 additions and 5 deletions

11
lib/typings/api.d.ts vendored
View file

@ -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;

View file

@ -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;