From af441330ff7cfdc466281ce135ca7231ec54c499 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 17 Jul 2018 23:33:49 -0700 Subject: Improving nomsu codegen. --- parser.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'parser.lua') 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 -- cgit v1.2.3