@@ -30,4 +30,11 @@ extension ExpressionStatement: EvaluatableParserStatement {
|
||||
public func evaluate(execution: ProgramExecution) -> ProgramExecution {
|
||||
return execution
|
||||
}
|
||||
}
|
||||
|
||||
// Variables are evaluatable because they can be looked up by identifiers.
|
||||
extension Identifier: EvaluatableExpression {
|
||||
public func evaluate(execution: Common.ProgramExecution) -> Result<P4Value> {
|
||||
return execution.scopes.evaluate(identifier: self)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user