Support Parameters For Parsers

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-03-30 07:57:41 -04:00
parent 744c375c5f
commit 8962235aca
8 changed files with 317 additions and 26 deletions
+2 -2
View File
@@ -266,11 +266,11 @@ public struct Parser {
}
static func Compile(
withName name: Common.Identifier, node: Node,
withName name: Common.Identifier, withParameters parameters: ParameterList, node: Node,
withContext context: CompilerContext
) -> Result<(P4Lang.Parser, CompilerContext)> {
var parser = P4Lang.Parser(withName: name)
var parser = P4Lang.Parser(withName: name, withParameters: parameters)
// Build a state from each one listed.
var error: Error? = .none