There were significant overlaps in the names of data structures
between the compiler and the language that made it necessary
to litter the code with P4Lang.xxxx. This refactor removes that
requirement in most places (Parser is ambiguous wherever TreeSitter
is used -- cannot avoid that!)
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
When the user gives relative path names for p4 files, report
those in error messages (etc.). The SourceManager can/does
resolve those to absolute path names.
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
The compilation code was written as a precursor for implementation
with macros. The updates in this commit make the switch.
There is still plenty to do:
1. Comment Walker.
2. Comment Macros.
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
Add support functions to check whether a (block of) statement(s) contains
any statements that should not appear in that block (e.g., switch in
an action).
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>