9 Commits (0847a69643fd17427cf2956ddffa07caf73cdfe1)

Author SHA1 Message Date
David Majda 0847a69643 Rename the "PEG" variable to "peg"
So far, PEG.js was exported in a "PEG" global variable when no module
loader was detected. The same variable name was also conventionally used
when requiring it in Node.js or otherwise referring to it. This was
reflected in various places in the code, documentation, examples, etc.

This commit changes the variable name to "peg" and fixes all relevant
occurrences. The main reason for the change is that in Node.js, modules
are generally referred to by lower-case variable names, so "PEG" was
sticking out when used in Node.js projects.
8 years ago
David Majda e61c23c634 ESLint: Set environments better
Instead of setting ESLint environment to "node" globally, set it on
per-directory basis using separate .eslintrc.json files:

  Directory   Environment
  -----------------------
  bin         node
  lib         commonjs
  spec        jasmine

It was impossible to use this approach for the "benchmark" directory
which contains a mix of files used in various environments. For
benchmark/run, the environment is set inline. For the other files, as
well as spec/helpers.js, the globals are declared manually (it is
impossible to express how these files are used just by a list of
environments).

Fixes #408.
8 years ago
Arlo Breault 12c169e7b5 Convert PEG.js code to strict mode
* Issues #323
9 years ago
Arlo Breault 7a94f97b46 Convert benchmark files to modules 9 years ago
David Majda 811a5c0f01 Small cleanup of benchmark/runner.js
Update coding style to match the rest of PEG.js.
10 years ago
David Majda 0865e9e51a Make benchmark suite support |trackLineAndColumn| option
Both the browser and the command-line version of the benchmark suite
runner now allow users to specify a value of the |trackLineAndColumn|
option. In case of the command-line version this required a minor CLI
redesign.
12 years ago
David Majda 8841c31d1b benchamrk/runner.js: Add "()" to constructor invocations
Fixes the following JSHint errors:

  ./benchmark/runner.js: line 73, col 28, Missing '()' invoking a constructor.
  ./benchmark/runner.js: line 75, col 33, Missing '()' invoking a constructor.
13 years ago
David Majda cad3013966 benchmark/runner.js: Add missing semicolon
Fixes the following JSHint error:

  ./benchmark/runner.js: line 21, col 42, Missing semicolon.
13 years ago
David Majda a091cb2ffd Factor out parts of benchmarks unrelated to running in the browser 13 years ago