1196 Commits (699038c5076c2a83cc70cb72e49b5bec7e113de6)
 

Author SHA1 Message Date
Futago-za Ryuu 699038c507 Link to doc for plugins 7 years ago
Futago-za Ryuu ab9b8d41bb Add doc for tracer.trace 7 years ago
Futago-za Ryuu 87ad103177 Move nyc options to separate config 7 years ago
Futago-za Ryuu 94a5f24817 Use only Yarn 7 years ago
Futago-za Ryuu b3329e626e Integrate yarn 7 years ago
Futago-za Ryuu 6335818cb7 Gulp 4 7 years ago
Futago-za Ryuu 3745195315 Make the default tracer an optional feature 7 years ago
Futago-za Ryuu 72ba85b3af Use 'visitor.on' instead of 'visitor.for' 7 years ago
Futago-za Ryuu 7cd291cbe0 Add doc for plugins (closes #544) 7 years ago
Futago-za Ryuu 70dea07923 Update twitter link 7 years ago
Futago-za Ryuu 46c3dcf40b Document Session#fatal method 7 years ago
Futago-za Ryuu f4ca7ca461 Remove grammar option for Session API 7 years ago
Futago-za Ryuu 6d25da2d2b Use bare option with browserify 7 years ago
Futago-za Ryuu 126a4c95f4 Update devDependencies
Closes #568
7 years ago
Futago-za Ryuu 2f0680ca16 Restore orignal output on generation fail
If the output file already exists, and the parser generator fails, the result is a empty file. This commit tries  to avoid this pitfall.
7 years ago
Futago-za Ryuu 21a6de06d5 Optional features
This commit enables optional features that are enabled by default in the generated parser.

For now, only some of the helpers and filename are generated based on this new option, but this will change in the future most likely.

Resolves #421
7 years ago
Futago-za Ryuu 15d364587c Update tsd to include changes since 8e9be9a 7 years ago
Futago-za Ryuu 2ac387e1c9 Move documentation
The README.md file in the root of the repository had become too large, and as a result the file became hard to maintain.

This commit extracts all the documentation and moves it to separate but managable files within the docs directory, a new folder also located in the root of the repository.
7 years ago
Futago-za Ryuu 418f441d88 Ignore '.idea' directory 7 years ago
Futago-za Ryuu fedf0f3480 Resolve 'vm.runInContext' bottleneck
Calling 'vm.runInContext'  is slightly more expensive then calling `eval`, but removing the string template and extracting the variable generator helps abit.
7 years ago
Futago-za Ryuu 43a305eaef Clarify templates
- what to chose and do
- remove checkboxs
- all question in comments
- reformat style
7 years ago
Futago-za Ryuu b3135690b0 Not session.fail but session.fatal 7 years ago
Futago-za Ryuu 30cfa29553 Provide context to parser (#517) 7 years ago
Futago-za Ryuu 04dfef3b63 Use error emitter (Closes #430) 7 years ago
Futago-za Ryuu ef0595596f Implement error emitter (Closes #431)
Along with commit 851d8ed, this resolves #431 based on the fact that plugins can overwrite session methods, allowing use cases like multiple or limited errors (and/or warnings) to be an opt-in feature.
7 years ago
Futago-za Ryuu a11d217167 Updated devDependencies 7 years ago
Futago-za Ryuu 621b11b715 Disable no-unused-vars in Session API 7 years ago
Futago-za Ryuu 6500189d58 Report unused rules (Closes #200) 7 years ago
Futago-za Ryuu 851d8edfdd Implement warning emitter (Closes #327) 7 years ago
Futago-za Ryuu f4c67993f6 Added the Session API 7 years ago
Futago-za Ryuu 8e9be9afea Use CommentMap 7 years ago
Futago-za Ryuu 11bc94f4c3 Updated docs for JavaScript API [ci skip]
This includes detials about the 3 main methods a developer will use along with their respective options.

Closes #553
7 years ago
Futago-za Ryuu a5d7cc11a4 ECMA, not ESMA 7 years ago
Futago-za Ryuu fe6f09238a Relay parser opts from peg.generate (#553) 7 years ago
Futago-za Ryuu 8d711627c1 Remove usless refrences to peg 7 years ago
Futago-za Ryuu 269b36b9db Remove redundant glob for linting 7 years ago
Futago-za Ryuu a79757683f Should be 'test/impact master' 7 years ago
Futago-za Ryuu 5476eca59f Moved AST and visitor classes 7 years ago
Futago-za Ryuu f41ef82ce9 Update tsd to include latest changes
These changes are mainly from from @Minigun and @futagoza
7 years ago
Futago-za Ryuu 4b6ceb2b46 Fix plugin test that replaces parser
This test broke down aftert I intergrated the AST utils directly into the Grammar class, then I had problems importing the PEG.js parser to use the Grammar class, but found a workaround using 'process.cwd()'
7 years ago
Futago-za Ryuu b0a5db1ab9 Expose ast classes used by parser 7 years ago
Futago-za Ryuu 9ecb21b749 stripLocation > stripProperties 7 years ago
Futago-za Ryuu 9d266625b4 Merge ast utils into Grammar class 7 years ago
Mingun 1a713d0175 Add some useful debug information to some exceptions (#475)
* Add some useful debug information to some exceptions

* Add guard for visitor functions preventing from cryptic errors due to incomplete visitors

* Add guard for js generator for preventing from cryptic errors due to incarrect stack manipulations
7 years ago
Mingun 0dab14d652 Add ability to extract comments from the grammar (#511)
All comments stored in the `comments` property of the `grammar` node.
Comments extracted only if the `extractComments` options set to `true` when you generate parser.
This property is object with mapping start offset of comment to comment object, that looks like:

```js
{
  text: 'text in the comment, just after // or /* and before */',
  multiline: true|false,// true for /**/ comments, false for // comments
  location: location()
}
```
7 years ago
Futago-za Ryuu b6bc0d905e Use .js files with -c option on CLI
This commit adds support for '.js' files to be passed to the '-c', '--config'  or '--extra-options-file' options on the CLI, allowing the developer to do some extra work before the parser is generated (if they wish), or dynamically set options based on the enviroment.
7 years ago
Futago-za Ryuu d06a5b52ef Restore silentFails guard for rule$expects 7 years ago
Futago-za Ryuu 75a4101622 Some cosmetic changes
- Remove unused '__slice' variable
- Nicely indent a map/concat chain
- 'forEach' instead of 'map' in emitted code
7 years ago
Futago-za Ryuu f5b323b401 Report consistent errors on look ahead + cached results
This should resolve issue #452, and is based entirely on a fix @nikku did on a local branch of PEG.js v0.10.0 (Currently at https://github.com/nikku/pegjs/tree/452-peg-js-0.10-fix).

Also his test case from #555 is included.

Fixes #452, Closes #555
7 years ago
Mingun 9b90fa1d81 Move all codegeneration from `generateBytecode` pass to `generateJs` pass (#459)
* Split 'consts' collection by content types into:

  - literals: for literal expressions, like `"a"`
  - classes: for character class expressions, like `[a]`
  - expectations: for constants describing expected values when parse failed
  - functions: for constants with function code

* Move any JavaScript code generation from 'generateBytecode' to 'generateJs'.
* Rename opcode 'MATCH_REGEXP' to 'MATCH_CLASS' (name reflects purpose, not implementation).
* Replace 'PUSH' opcode with 'PUSH_EMPTY_STRING' opcode because it is only used with empty strings
7 years ago