Accept comptime-known expression for asm

This commit is contained in:
LemonBoy
2019-12-02 21:07:44 +01:00
committed by Andrew Kelley
parent b7be57766b
commit 26c8930b95
8 changed files with 193 additions and 88 deletions

View File

@@ -1891,7 +1891,7 @@ static AstNode *ast_parse_asm_expr(ParseContext *pc) {
Token *volatile_token = eat_token_if(pc, TokenIdKeywordVolatile);
expect_token(pc, TokenIdLParen);
Token *asm_template = expect_token(pc, TokenIdStringLiteral);
AstNode *asm_template = ast_expect(pc, ast_parse_expr);
AstNode *res = ast_parse_asm_output(pc);
if (res == nullptr)
res = ast_create_node_no_line_info(pc, NodeTypeAsmExpr);