aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-07 01:53:45 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-07 01:53:45 -0500
commit92793252ad43c4119902506f95e726de3492c128 (patch)
treebdb9517eccef0ee9eae7008ce8af85d1269218fb /src/parser.cpp
parent916a96fb724aab03be0e0a1bbaef6de8cc6c305c (diff)
downloadzig-92793252ad43c4119902506f95e726de3492c128.tar.gz
zig-92793252ad43c4119902506f95e726de3492c128.zip
inline assembly allows clobbers with no input
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 57b226270a..b55eefe6ac 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -497,6 +497,12 @@ static void ast_parse_asm_input(ParseContext *pc, size_t *token_index, AstNode *
*token_index += 1;
+ Token *colon_again = &pc->tokens->at(*token_index);
+ if (colon_again->id == TokenIdColon) {
+ ast_parse_asm_clobbers(pc, token_index, node);
+ return;
+ }
+
for (;;) {
ast_parse_asm_input_item(pc, token_index, node);