Skip to content

Commit

Permalink
refactor(parser): merge lexer with parser & optimize parser
Browse files Browse the repository at this point in the history
* refactor(parser): merge lexer with parser & optimize parser

* refactor(value-converter): set AllArgs inside constructor

* test(parser): cleanup / add more tests

* fix(parser): make unicode escape case insensitive

* fix(parser): check bounds for unicode escapes

* tests(parser): add unit tests for binary expression precedence

* tests(parser): add unit tests for parsing numbers

* docs(parser): add documentation link for operator precedence

* refactor(parser): optimize number scanning

* refactor(parser): clean-up, improve readability

* refactor(parser): align token names with char names

* docs(parser): fix typo

* refactor(parser): minor tweak to currentChar

* chore(parser): fix formatting

* refactor(parser): improve decimal parsing

* refactor(parser): improve/test error reporting

* fix(parser): ensure property accessors are identifiers, make invalid object literals explicit

* tests(parser): remove duplicate tests, fix error verification, correct assign tests
  • Loading branch information
fkleuver authored and jdanyow committed May 5, 2018
1 parent 6c43e41 commit fd6083f
Show file tree
Hide file tree
Showing 4 changed files with 1,397 additions and 829 deletions.
4 changes: 2 additions & 2 deletions src/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ export class BindingBehavior extends Expression {
}

export class ValueConverter extends Expression {
constructor(expression, name, args, allArgs) {
constructor(expression, name, args) {
super();

this.expression = expression;
this.name = name;
this.args = args;
this.allArgs = allArgs;
this.allArgs = [expression].concat(args);
}

evaluate(scope, lookupFunctions) {
Expand Down
Loading

0 comments on commit fd6083f

Please sign in to comment.