Skip to content

Commit

Permalink
Parse - Fix incorrect handling of builtin # (would capture `builtin…
Browse files Browse the repository at this point in the history
… {`)
  • Loading branch information
thepowersgang committed Feb 27, 2024
1 parent 9d5f400 commit df69b74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/parse/expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,9 @@ ExprNodeP Parse_ExprVal(TokenStream& lex)
return Parse_ExprVal_StructLiteral(lex, ::std::move(path));
else
DEBUG("Not parsing struct literal");
// Value
PUTBACK(tok, lex);
return NEWNODE( AST::ExprNode_NamedValue, ::std::move(path) );
// `builtin # <name>` - seems to be a 1.74 era hack to extend syntax
// - Only `builtin # offset_of( <ty>, <field>[, <subfield>]... )` is implemented
// > mrustc translates this to an intrinsic call with the fields as string/integer arguments (simple to pass through)
Expand Down

0 comments on commit df69b74

Please sign in to comment.