compiler: Support Querying For Files In Preprocessed Code

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-05-11 07:26:29 -04:00
parent f0f7a660a6
commit 0e2b13be93
5 changed files with 58 additions and 0 deletions
@@ -0,0 +1,9 @@
state start {
Testing ts;
ts.yesno = true;
ts.count = 5;
transition select (ts.count == 5) {
true: accept;
false: reject;
};
}
+3
View File
@@ -0,0 +1,3 @@
parser main_parser() {
#include <file-loc-parser-state.p4>
}
+5
View File
@@ -0,0 +1,5 @@
struct Testing {
bool yesno;
int count;
};
#include <file-loc-parser.p4>