aboutsummaryrefslogtreecommitdiff
path: root/parser.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-17 23:33:49 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-17 23:33:56 -0700
commitaf441330ff7cfdc466281ce135ca7231ec54c499 (patch)
treed046e1ee824fdb9828fdb99af31e9fc17087e6e4 /parser.lua
parentceb29321edef05b8416a72a1f396c683f0c6c831 (diff)
Improving nomsu codegen.
Diffstat (limited to 'parser.lua')
-rw-r--r--parser.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/parser.lua b/parser.lua
index 1ccd263..c3478dc 100644
--- a/parser.lua
+++ b/parser.lua
@@ -229,6 +229,9 @@ Parser.parse = function(nomsu_code, source, version)
return tree
end
Parser.is_operator = function(s)
- return not not (NOMSU_DEFS.operator_char ^ 1):match(s)
+ return not not (NOMSU_DEFS.operator_char ^ 1 * -1):match(s)
+end
+Parser.is_identifier = function(s)
+ return not not (NOMSU_DEFS.ident_char ^ 1 * -1):match(s)
end
return Parser