From 93f9068c99021086941d03b00931149b0001140f Mon Sep 17 00:00:00 2001 From: Futago-za Ryuu Date: Sun, 7 Jan 2018 01:08:35 +0000 Subject: [PATCH] Updated tsd for compiler passes [ci skip] --- lib/typings/api.d.ts | 11 ++++++----- lib/typings/modules.d.ts | 12 ++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/typings/api.d.ts b/lib/typings/api.d.ts index fd8a855..cbe2e1b 100644 --- a/lib/typings/api.d.ts +++ b/lib/typings/api.d.ts @@ -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; diff --git a/lib/typings/modules.d.ts b/lib/typings/modules.d.ts index 5472141..f819b92 100644 --- a/lib/typings/modules.d.ts +++ b/lib/typings/modules.d.ts @@ -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;