Support Calling Parsers With Parameters

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-04-02 01:28:43 -04:00
parent 7cdbee1999
commit d971aab1fe
12 changed files with 345 additions and 82 deletions
+3 -2
View File
@@ -34,6 +34,7 @@ public protocol EvaluatableParserState: P4Value {
func state() -> ParserState
}
public protocol ParserExecution {
func execute(execution: ProgramExecution) -> (InstantiatedParserState, ProgramExecution)
public protocol CallableExecution<T> {
associatedtype T
func call(execution: ProgramExecution, arguments: ArgumentList) -> (T, ProgramExecution)
}