49 bool expandHeader =
true;
51 struct ExpansionInfo {
52 const IR::Statement *statement;
54 const IR::Type *origType;
55 const IR::PathExpression *tmp;
58 void expand(
const IR::PathExpression *bitvector,
const IR::Type *type,
unsigned *offset,
60 ExpansionInfo *convertLookahead(
const IR::MethodCallExpression *expression);
64 : typeMap(typeMap), expandHeader(expandHeader) {
66 setName(
"DoExpandLookahead");
69 auto rv = Transform::init_apply(node);
75 const IR::Node *postorder(IR::AssignmentStatement *statement)
override;
76 const IR::Node *postorder(IR::MethodCallStatement *statement)
override;
77 const IR::Node *preorder(IR::P4Control *control)
override {
81 const IR::Node *preorder(IR::P4Parser *parser)
override {
85 const IR::Node *postorder(IR::P4Parser *parser)
override {
86 if (!newDecls.empty()) parser->parserLocals.append(newDecls);
Visitor mixin for looking up names in enclosing scopes from the Visitor::Context.
Definition resolveReferences.h:35
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24