Skip to content

Commit

Permalink
Version 1.80
Browse files Browse the repository at this point in the history
Proper error reporting when encountering invalid empty parentheses
  • Loading branch information
d0sboots committed Jul 13, 2024
1 parent 44c5da3 commit de60a77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2 class="settings">Settings</h2>

<div class="editor-info">
<div>
<span class="infotext">Editor: 1.79 ─ Game: v0.47.1</span>
<span class="infotext">Editor: 1.80 ─ Game: v0.47.1</span>
<br/>
<span id="warning" class="infotext warning">Cannot access Local Storage. Scripts will not save!</span>
<a id="compression" class="infotext warning" target="_blank" style="display:none" href="old_browser.html">
Expand Down
3 changes: 2 additions & 1 deletion scripts/lexer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ end

local function consumeTokensWorker(node)
if #node.tokens == 0 then
assert(node.func, tokenError(node, "invalid empty parenthesis"));
return;
elseif #node.tokens == 1 then
table.insert(node.args, resolveID(node.tokens[1]));
Expand Down Expand Up @@ -353,7 +354,7 @@ function lexer(line, vars)
func = assert(FUNCTION[func], tokenError(last, "trying to call a non-function: " .. func));
end

node = newNode(last and last.pos or token.pos, node, func);
node = newNode(func and last.pos or token.pos, node, func);
elseif token.type == "next" then
assert(node.func, tokenError(token, "unexpected symbol: " .. token.value));
consumeTokens(node);
Expand Down

0 comments on commit de60a77

Please sign in to comment.