diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-14 04:31:46 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-14 04:31:46 -0700 |
| commit | 27f89faaee6f318edcf4a19b95f01b523d84fe09 (patch) | |
| tree | 020b5ef779080d76ccb48e558558734067f425e5 /nomsu.moon | |
| parent | 02cda763c58e988301fe7819c9a12d9268e702c7 (diff) | |
Tweaked apostrophe rules to make %x's %y work.
Diffstat (limited to 'nomsu.moon')
| -rwxr-xr-x | nomsu.moon | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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? ")") |
