aboutsummaryrefslogtreecommitdiffstats
path: root/alv
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2021-01-02 22:32:12 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit69a63e7d8e71132fbd986fd4463536de700a7f93 (patch)
treed47b812f03537869278fe13ee1aea8ff5d6ae0e1 /alv
parentdocs/guide: fixes (diff)
downloadalive-69a63e7d8e71132fbd986fd4463536de700a7f93.tar.gz
alive-69a63e7d8e71132fbd986fd4463536de700a7f93.zip
syntax: more whitelisted special chars, comment parsing
Diffstat (limited to 'alv')
-rw-r--r--alv/parsing.moon4
1 files changed, 2 insertions, 2 deletions
diff --git a/alv/parsing.moon b/alv/parsing.moon
index 2e01efb..78ed7d1 100644
--- a/alv/parsing.moon
+++ b/alv/parsing.moon
@@ -14,12 +14,12 @@ comment = P {
expr: (P '(') * ((V 'expr') + (1 - P ')'))^0 * (P ')')
comment: (P '#(') * ((V 'expr') + (1 - P ')'))^0 * (P ')')
}
-space = (wc^1 * (comment * wc^1)^0) / 1 -- required whitespace
mspace = (comment + wc)^0 / 1 -- optional whitespace
+space = (wc^1 * (comment^0 * wc)^0) / 1 -- required whitespace
-- atoms
digit = R '09'
-first = (R 'az', 'AZ') + S '-_+*/.=~!?%><'
+first = (R 'az', 'AZ') + S '-_+*/.,=~!?%$><'
sym = first * (first + digit)^0 / Constant\parse 'sym'
strd = '"' * (C ((P '\\"') + (P '\\\\') + (1 - P '"'))^0) * '"' / Constant\parse 'str', '\"'