From bccfe9d8e12ba024c745cd533f73987439c76499 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 13 Oct 2017 19:41:58 -0700 Subject: Changed tokenizing to treat symbols as their own things. --- lib/operators.nom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/operators.nom') diff --git a/lib/operators.nom b/lib/operators.nom index 13e6ce4..09bdbcd 100644 --- a/lib/operators.nom +++ b/lib/operators.nom @@ -29,7 +29,7 @@ compile [..] |end)(nomsu, vars) # Indexing: -compile [%obj's %key, %obj -> %key] to: "(\(%obj as lua))[\(%key as lua)]" +compile [%obj'%key, %obj's %key, %obj -> %key] to: "(\(%obj as lua))[\(%key as lua)]" # Variable assignment operator, and += type versions compile [%var = %val] to code: "\(%var as lua) = \(%val as lua);" @@ -90,7 +90,7 @@ lua block ".." # Chained compairsions (e.g. x < y <= z) are defined up to 3 operands lua block ".." |local max_operands = 3; - |for _,chainers in ipairs({{"<","<="},{">",">="}}) do; + |for _,chainers in ipairs({{"<","< ="},{">","> ="}}) do; | local function recurse(chainers, chain) # The 1-op versions are already more efficiently defined, and a 0-op version doesnt make sense | if #chain >= 2 then; -- cgit v1.2.3