Support Parsing Function Declarations

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-04-02 02:48:43 -04:00
parent 07f1943611
commit fc0276ad42
2 changed files with 40 additions and 1 deletions
@@ -265,3 +265,40 @@ struct Testing {
)
)
=========================
Simple Function Declaration
=========================
bool functionb() {
string fieldA;
};
---
(p4program
(declaration
(function_declaration
(typeRef
(baseType
(bool)
)
)
(identifier)
(parameters
)
(statement
(blockStatement
(statements
(statement
(variableDeclaration
(typeRef
(baseType
(string)
)
)
(identifier)
)
)
)
)
)
)
)
)