
Public Member Functions | |
| DoTableKeyNames (const TypeMap *typeMap) | |
| const IR::Node * | postorder (IR::KeyElement *keyElement) override |
Adds a "@name" annotation to each table key that does not have a name. The string used for the name is derived from the expression itself - if the expression is "simple" enough. If the expression is not simple the compiler will give an error. Simple expressions are:
Examples of control plane names generated from expressions:
arr[16w5].f : @name("arr[5].f").foo : @name(".foo")foo.bar : @name("foo.bar")f.isValid() : @name("f.isValid()")f[3:0] : @name("f[3:0]")@name annotations.Emit a compilation error if the program contains complex key expressions without @name annotations.