Skip to content

Commit

Permalink
More Functional APIs for the parsing DSL.
Browse files Browse the repository at this point in the history
relates to #324
  • Loading branch information
bd82 committed Dec 11, 2016
1 parent 4a4d4bf commit 31bb9f1
Show file tree
Hide file tree
Showing 4 changed files with 343 additions and 160 deletions.
2 changes: 2 additions & 0 deletions benchmark/parsers/cssDevParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ function CssParser(input) {
// medium [ COMMA S* medium]*
this.media_list = this.RULE('media_list', function() {
$.SUBRULE($.medium)
// TODO: try without SEP
$.MANY_SEP(Comma, function() {
$.SUBRULE2($.medium)
})
Expand Down Expand Up @@ -313,6 +314,7 @@ function CssParser(input) {
// selector [ ',' S* selector ]*
// '{' S* declaration? [ ';' S* declaration? ]* '}' S*
this.ruleset = this.RULE('ruleset', function() {
// TODO: try without SEP?
$.AT_LEAST_ONE_SEP(Comma, function() {
$.SUBRULE($.selector)
})
Expand Down
Loading

0 comments on commit 31bb9f1

Please sign in to comment.