summaryrefslogtreecommitdiff
path: root/src/interpreter/PeggyParser.js
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-07 20:45:47 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-07 20:45:47 -0700
commite6e29440563e33bb67e0ad51f9fb6c5c2c3fe809 (patch)
tree5deaee322ff1a039dc44a3cb52ecc48a671fda2a /src/interpreter/PeggyParser.js
parent823620b2a6ebb7ece619991e47a37ad46542b69f (diff)
downloadthe-abstraction-engine-e6e29440563e33bb67e0ad51f9fb6c5c2c3fe809.tar.gz
the-abstraction-engine-e6e29440563e33bb67e0ad51f9fb6c5c2c3fe809.zip
level one (applications prototype finished!)
Diffstat (limited to 'src/interpreter/PeggyParser.js')
-rw-r--r--src/interpreter/PeggyParser.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interpreter/PeggyParser.js b/src/interpreter/PeggyParser.js
index 5671d91..632f1b7 100644
--- a/src/interpreter/PeggyParser.js
+++ b/src/interpreter/PeggyParser.js
@@ -201,7 +201,7 @@ export default (function () {
);
};
- function peg$parse(input, options) {
+ function peg$parse(input, options, allowUnderscores = false) {
options = options !== undefined ? options : {};
var peg$FAILED = {};
@@ -215,7 +215,7 @@ export default (function () {
var peg$c2 = ".";
var peg$c3 = "\r\n";
- var peg$r0 = /^[a-zA-Z0-9]/;
+ var peg$r0 = allowUnderscores ? /^[a-zA-Z0-9]_/ : /^[a-zA-Z0-9]/;
var peg$r1 = /^[\\\u03BB]/;
var peg$r2 = /^[\t-\n ]/;