@@ -1031,14 +1031,14 @@ function ParserMethods:consumeMethodCall(currentExpression)
10311031 return functionCallNode
10321032end
10331033
1034- function ParserMethods :consumeOptionalSemilcolon ()
1034+ function ParserMethods :consumeOptionalSemicolon ()
10351035 local nextToken = self :lookAhead (1 )
10361036 if self :checkCharacter (" ;" , nextToken ) then
10371037 self :consume (1 )
10381038 end
10391039end
10401040
1041- -- // EXPRESSSION PARSERS //--
1041+ -- // EXPRESSION PARSERS //--
10421042function ParserMethods :parsePrimaryExpression ()
10431043 if not self .currentToken then return end
10441044 local tokenType = self .currentToken .TYPE
@@ -1362,7 +1362,7 @@ function ParserMethods:parseFor()
13621362end
13631363
13641364function ParserMethods :parseFunction ()
1365- -- fuction <variable>[.<field>]:<method>(...)
1365+ -- function <variable>[.<field>]:<method>(...)
13661366 -- <codeblock>
13671367 -- end
13681368 self :consumeToken (" Keyword" , " function" )
@@ -1458,7 +1458,7 @@ function ParserMethods:getNextNode()
14581458 else
14591459 node = self :parseFunctionCallOrVariableAssignment ()
14601460 end
1461- self :consumeOptionalSemilcolon ()
1461+ self :consumeOptionalSemicolon ()
14621462
14631463 return node
14641464end
@@ -1529,7 +1529,7 @@ local unpack = (unpack or table.unpack)
15291529
15301530local COMPILER_MIN_STACK_SIZE = 2 -- Registers 0/1 are always valid
15311531local COMPILER_SETLIST_MAX = 50
1532- local COMPILER_SIMPLE_ARICHMETIC_OPERATOR_LOOKUP = {
1532+ local COMPILER_SIMPLE_ARITHMETIC_OPERATOR_LOOKUP = {
15331533 [" +" ] = " ADD" , [" -" ] = " SUB" ,
15341534 [" *" ] = " MUL" , [" /" ] = " DIV" ,
15351535 [" %" ] = " MOD" , [" ^" ] = " POW"
@@ -1637,7 +1637,6 @@ end
16371637function CodeGeneratorMethods :deallocateRegisters (registers )
16381638 local registerLookup = createLookupTable (registers )
16391639 local amountOfRegistersToDeallocate = # registers
1640- local registersToDellocate = {}
16411640 for i = 1 , amountOfRegistersToDeallocate do
16421641 local register = self .nextFreeRegister - i
16431642 if not registerLookup [register ] then
@@ -1961,8 +1960,8 @@ end
19611960
19621961function CodeGeneratorMethods :compileBinaryOperatorNode (node , expressionRegister )
19631962 local nodeOperator = node .Operator
1964- if COMPILER_SIMPLE_ARICHMETIC_OPERATOR_LOOKUP [nodeOperator ] then
1965- local opcode = COMPILER_SIMPLE_ARICHMETIC_OPERATOR_LOOKUP [nodeOperator ]
1963+ if COMPILER_SIMPLE_ARITHMETIC_OPERATOR_LOOKUP [nodeOperator ] then
1964+ local opcode = COMPILER_SIMPLE_ARITHMETIC_OPERATOR_LOOKUP [nodeOperator ]
19661965 self :processExpressionNode (node .Left , expressionRegister )
19671966 local rightExpressionRegister = self :processExpressionNode (node .Right )
19681967 self :addInstruction (opcode , expressionRegister , expressionRegister , rightExpressionRegister )
0 commit comments