Commit 3f6b178
Handwritten parser
This subjective and opinionated patch fixes many issues but has
several drawbacks.
The parser should be usable in strict mode now (see #9). It is not
longer generated by `jison`. `parse.js` contains a simple handwritten
recursive decent parser. It should be easier to debug and to hack, but
there is definitely more code and one can prefer parser generators.
Note that `jison` seems to have big maintainance issues.
Note that [Yargs](https://github.com/yargs/yargs) is not usable in strict mode because it depends on
this package.
I also simplified the lexer (IMHO).
I wrote more Mocha-based tests in `test/index.js`. I really like the
embedded tests in `README.md`, but I was afraid to bloat it with
boring spec-compliance tests.
This patch does not introduce a breaking change and does not change
dependencies (however, it changes devDependencies).1 parent c35ccd2 commit 3f6b178
File tree
13 files changed
+621
-487
lines changed- test
13 files changed
+621
-487
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
8 | 6 | | |
0 commit comments