Skip to content

Commit

Permalink
Merge pull request #160 from SpinnySpiwal/patch-4
Browse files Browse the repository at this point in the history
Update compiler.lua
  • Loading branch information
levno-710 authored Aug 12, 2024
2 parents 9877463 + 9151e63 commit d3d0e70
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/prometheus/compiler/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ function Compiler:compileStatement(statement, funcDepth)
return;
end

-- Function call Statement
-- Function Call Statement
if(statement.kind == AstKind.FunctionCallStatement) then
local baseReg = self:compileExpression(statement.base, funcDepth, 1)[1];
local retReg = self:allocRegister(false);
Expand Down Expand Up @@ -1254,7 +1254,7 @@ function Compiler:compileStatement(statement, funcDepth)
return;
end

-- Pass self Function Call Statement
-- Pass Self Function Call Statement
if(statement.kind == AstKind.PassSelfFunctionCallStatement) then
local baseReg = self:compileExpression(statement.base, funcDepth, 1)[1];
local tmpReg = self:allocRegister(false);
Expand Down Expand Up @@ -1662,7 +1662,7 @@ function Compiler:compileStatement(statement, funcDepth)
return;
end

-- For in Statement
-- For In Statement
if(statement.kind == AstKind.ForInStatement) then
local expressionsLength = #statement.expressions;
local exprregs = {};
Expand Down Expand Up @@ -1792,7 +1792,7 @@ function Compiler:compileStatement(statement, funcDepth)
return;
end

-- Contiue Statement
-- Continue Statement
if(statement.kind == AstKind.ContinueStatement) then
local toFreeVars = {};
local statScope;
Expand Down Expand Up @@ -1824,7 +1824,7 @@ function Compiler:compileStatement(statement, funcDepth)
return;
end

-- Compund Statements
-- Compound Statements
local compoundConstructors = {
[AstKind.CompoundAddStatement] = Ast.CompoundAddStatement,
[AstKind.CompoundSubStatement] = Ast.CompoundSubStatement,
Expand Down Expand Up @@ -1970,7 +1970,7 @@ function Compiler:compileExpression(expression, funcDepth, numReturns)
return regs;
end

-- Function call Expression
-- Function Call Expression
if(expression.kind == AstKind.FunctionCallExpression) then
local baseReg = self:compileExpression(expression.base, funcDepth, 1)[1];

Expand Down Expand Up @@ -2026,7 +2026,7 @@ function Compiler:compileExpression(expression, funcDepth, numReturns)
return retRegs;
end

-- Pass self Function Call Expression
-- Pass Self Function Call Expression
if(expression.kind == AstKind.PassSelfFunctionCallExpression) then
local baseReg = self:compileExpression(expression.base, funcDepth, 1)[1];
local retRegs = {};
Expand Down

0 comments on commit d3d0e70

Please sign in to comment.