Skip to content

Commit

Permalink
Add counting lineBreaks in js and btstring
Browse files Browse the repository at this point in the history
  • Loading branch information
aliclark committed Sep 20, 2020
1 parent 98e4d21 commit 6983001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/nearley-language-bootstrapped.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var rules = Object.assign({
js: {
match: /\{\%(?:[^%]|\%[^}])*\%\}/,
value: x => x.slice(2, -2),
lineBreaks: true,
},
word: {match: /[\w\?\+]+/, next: 'afterWord'},
string: {
Expand All @@ -34,6 +35,7 @@ var rules = Object.assign({
match: /`[^`]*`/,
value: x => x.slice(1, -1),
next: 'main',
lineBreaks: true,
},
}, literals([
",", "|", "$", "%", "(", ")",
Expand Down
2 changes: 2 additions & 0 deletions lib/nearley-language-bootstrapped.ne
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var rules = Object.assign({
js: {
match: /\{\%(?:[^%]|\%[^}])*\%\}/,
value: x => x.slice(2, -2),
lineBreaks: true,
},
word: {match: /[\w\?\+]+/, next: 'afterWord'},
string: {
Expand All @@ -31,6 +32,7 @@ var rules = Object.assign({
match: /`[^`]*`/,
value: x => x.slice(1, -1),
next: 'main',
lineBreaks: true,
},
}, literals([
",", "|", "$", "%", "(", ")",
Expand Down

0 comments on commit 6983001

Please sign in to comment.