aboutsummaryrefslogtreecommitdiff
path: root/nomsu.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-14 04:31:46 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-14 04:31:46 -0700
commit27f89faaee6f318edcf4a19b95f01b523d84fe09 (patch)
tree020b5ef779080d76ccb48e558558734067f425e5 /nomsu.moon
parent02cda763c58e988301fe7819c9a12d9268e702c7 (diff)
Tweaked apostrophe rules to make %x's %y work.
Diffstat (limited to 'nomsu.moon')
-rwxr-xr-xnomsu.moon4
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu.moon b/nomsu.moon
index a27354a..90c847e 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -194,7 +194,7 @@ class NomsuCompiler
((%indent %new_line block ((%dedent (%new_line "..")?) / errors))
/ (one_liner (%ws? (%new_line? ".."))?)) }) -> Thunk
- word <- ({ !number {%wordchar+} }) -> Word
+ word <- ({ !number {%wordchar (!"'" %wordchar)*} }) -> Word
expression <- ({ (longstring / string / number / variable / list / thunk / subexpression) }) -> Expression
string <- ({ (!longstring) '"' {(("\" [^%nl]) / [^"%nl])*} '"' }) -> String
@@ -210,7 +210,7 @@ class NomsuCompiler
|}}) -> Longstring
string_interpolation <- "\" %ws? (functioncall / expression) %ws? "\"
number <- ({ {'-'? [0-9]+ ("." [0-9]+)?} }) -> Number
- variable <- ({ ("%" {%wordchar+}) }) -> Var
+ variable <- ({ ("%" {%wordchar (!"'" %wordchar)*}) }) -> Var
subexpression <-
("(" %ws? (functioncall / expression) %ws? ")")