Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rbonifacio committed Jul 1, 2024
1 parent e60b8d5 commit f6a82d4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,6 @@ class InterpreterTest extends AnyFunSuite with Oberon2ScalaParser {
assert(result.lookup("answer") == Some(IntValue(217)))
}

def evalArraySubscript(environment : Environment[Expression], name: String, index: Integer): (Environment[Expression], Expression) =
interpreter.evalExpression(environment, ArraySubscript(VarExpression(name), IntValue(index)))

def evalArraySubscript(environment : Environment[Expression], name: String, index: Integer): Expression =
interpreter.evalExpression(ArraySubscript(VarExpression(name), IntValue(index))).runA(environment).value
}

0 comments on commit f6a82d4

Please sign in to comment.