13 Commits (6d25da2d2b3a25bdfd2bdbb759484de653f32437)

Author SHA1 Message Date
Futago-za Ryuu 04dfef3b63 Use error emitter (Closes #430) 7 years ago
Futago-za Ryuu f4c67993f6 Added the Session API 7 years ago
Futago-za Ryuu 5476eca59f Moved AST and visitor classes 7 years ago
Futago-za Ryuu 9d266625b4 Merge ast utils into Grammar class 7 years ago
Mingun 3e89534bb7 Auto-add `allowedStartRules` to test options for `changeAST` and `reportError` methods if it not defined 7 years ago
Futago-za Ryuu e6d018a88d Update code format and style
This is related to my last commit. I've updated all the JavaScript files to satisfy 'eslint-config-futagozaryuu', my eslint configuration.

I'm sure I've probally missed something, but I've run all NPM scripts and Gulp tasks, fixed any bugs that cropped up, and updated some stuff (mainly related to generated messages), so as far as I can, tell this conversion is over (I know I've probally jixed it just by saying this ;P).
7 years ago
felix ee00a1ae6a Check allowedStartRules exist. (#532)
Fixes #524
7 years ago
David Majda 1870308afb Code style: Fix ESLint "object-shorthand" errors
Part of #407.
8 years ago
David Majda ff7193776e Avoid aligning "="
The only exception left are instances where aligning "=" helps to
express symmetry between lines.

See #443.
8 years ago
David Majda 6294bb5b13 Use only "//" comments
See #443.
8 years ago
David Majda 516023546d Use one var/let/const per variable (for initialized variables)
Use one var/let/const per variable, but only for initialized variables.
Uninitialized variables are still grouped into one var/let/const
declaration as I don't see any value in separating them. This approach
reflects the fact that initialized and uninitialized var/let/const
declarations are really two different things.

See #443.
8 years ago
David Majda bdf91b5941 Replace "var" with "let" & "const"
This is purely a mechanical change, not taking advantage of block scope
of "let" and "const". Minimizing variable scope will come in the next
commit.

In general, "var" is converted into "let" and "const" is used only for
immutable variables of permanent character (generally spelled in
ALL_CAPS). Using it for any immutable variable regardless on its
permanence would feel confusing.

Any code which is not transpiled and needs to run in ES6 environment
(examples, code in grammars embedded in specs, ...) is kept unchanged.
This is also true for code generated by PEG.js.

See #442.
8 years ago
David Majda 9717dc3417 Talk about "undefined rules" instead of "missing rules" internally
The new terminology is more precise and in line with commonly used
programming languages.

The change involves mainly renaming related compiler pass and files
associated with it.
8 years ago