Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modulo operation was implemented (as it was described in #44 issue)
- Loading branch information
1 parent
e5b1f67
commit 91572f2
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.arnoldc.ast | ||
|
||
import org.objectweb.asm.MethodVisitor | ||
import org.objectweb.asm.Opcodes._ | ||
import org.arnoldc.SymbolTable | ||
|
||
|
||
case class ModuloExpressionNode(expression: AstNode ,operand: AstNode ) extends AstNode { | ||
def generate(mv: MethodVisitor, symbolTable: SymbolTable) { | ||
expression.generate(mv, symbolTable) | ||
operand.generate(mv, symbolTable) | ||
mv.visitInsn(IREM) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters