aboutsummaryrefslogtreecommitdiff
path: root/nomsu.peg
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-05-24 14:57:24 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-05-24 14:57:35 -0700
commit2e345e271f27147051b8ce1f2981ba728b14394a (patch)
tree5f56bc1886ed887ad87ffb86b7591fcc5bf09368 /nomsu.peg
parentad94ed3653e2b7a9f68855670a32617aa80a637c (diff)
Misc changes, fixed up Object lib and tests.
Diffstat (limited to 'nomsu.peg')
-rw-r--r--nomsu.peg4
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu.peg b/nomsu.peg
index 14689fc..afc5580 100644
--- a/nomsu.peg
+++ b/nomsu.peg
@@ -87,7 +87,7 @@ number (Number): (("-"? (([0-9]+ "." [0-9]+) / ("." [0-9]+) / ([0-9]+)))-> tonum
-- Variables can be nameless (i.e. just %) and can't contain operators like apostrophe
-- which is a hack to allow %'s to parse as "%" and "' s" separately
-variable (Var): "%" { plain_word? }
+variable (Var): "%" { ((!"'" %operator) / plain_word)* }
inline_list (List):
!('[..]')
@@ -132,4 +132,4 @@ dedent: eol (%nl ignored_line)* (((!.) &%dedent) / (&(%nl %dedent)))
non_dedent_error: (!dedent .)* eol (%nl ignored_line)* (!. / &%nl)
comma: %ws* "," %ws*
dotdot: nodent ".."
-plain_word: ([a-zA-Z0-9_] / %utf8_char)+
+plain_word: ([a-zA-Z0-9_-] / %utf8_char)+