about summary refs log tree commit diff
path: root/users/flokli/presentations/2023-09-09-nixcon-tvix/cppnix-example-lexer.cpp
attrpath
  : attrpath '.' attr {
    $$ = $1; $1->push_back(AttrName(data->symbols.create($3)));
  }
  | attrpath '.' string_attr
    { $$ = $1;
      ExprString * str = dynamic_cast<ExprString *>($3);
      if (str) {
          $$->push_back(AttrName(data->symbols.create(str->s)));
          delete str;
      } else
          $$->push_back(AttrName($3));
    }