diff --git a/docs/guides/javascript-api.md b/docs/guides/javascript-api.md index 6ee0935..5f6f1f5 100644 --- a/docs/guides/javascript-api.md +++ b/docs/guides/javascript-api.md @@ -62,7 +62,6 @@ An instance of this class holds helpers (methods, objects with methods, constant The following option's are used by the Session API, but are currently all optional: - * `grammar` - The input that was parsed (source for the PEG.js AST passed to the compiler and the current passes). * `opcodes` - An `enum` like hashmap (plain object) that is used by the bytecode and parser generators. * `parser` - A pre-generated PEG.js grammar parser that should return an instance of the PEG.js AST's Grammar class. Can be replaced to add additional syntax features, or allow an alternative syntax for the grammar. * `passes` - An object with each property being an array of methods that will check or alter the AST passed to them. diff --git a/lib/compiler/session.js b/lib/compiler/session.js index aacb48c..d4411ac 100644 --- a/lib/compiler/session.js +++ b/lib/compiler/session.js @@ -24,7 +24,6 @@ class Session { config = typeof config !== "undefined" ? config : {}; - this.grammar = config.grammar; this.opcodes = config.opcodes || opcodes; this.parser = config.parser || parser; this.passes = config.passes || {}; diff --git a/lib/peg.js b/lib/peg.js index d742e6a..fc1a24e 100644 --- a/lib/peg.js +++ b/lib/peg.js @@ -31,7 +31,6 @@ const peg = { const plugins = "plugins" in options ? options.plugins : []; const session = new compiler.Session( { - grammar: grammar, passes: util.convertPasses( compiler.passes ) } ); diff --git a/lib/typings/api.d.ts b/lib/typings/api.d.ts index 1df174d..b9c4968 100644 --- a/lib/typings/api.d.ts +++ b/lib/typings/api.d.ts @@ -438,7 +438,6 @@ declare namespace peg { interface ISessionConfig { [ key: string ]: any; - grammar?: string; opcodes?: IOpcodes; parser?: GeneratedParser; passes?: IPassesMap;