Skip to content

Commit d5545a5

Browse files
author
Oleksii Okhrymenko
committed
Allow extra space at the beginning of the GRAMMAR #5
1 parent 49f4f89 commit d5545a5

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/speg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ SPEG_actions.prototype.noop = function(node) {
6161
};
6262

6363
SPEG_actions.prototype.peg = function(node) {
64-
return node.children[2];
64+
return node.children[3];
6565
};
6666

6767
SPEG_actions.prototype.parsing_body = function(node) {

src/speg_parser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var rd = require('./rd_parser');
22

33
function peg() {
44
return rd.action('peg', rd.sequence([
5+
rd.zero_or_more(_()),
56
parsing_header(),
67
rd.one_or_more(_()),
78
parsing_body(),
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
GRAMMAR url test ->"asda";newtest-> "sda";

0 commit comments

Comments
 (0)