Skip to content
Browse files
Fix a typo of the context name of parsing asm options
  • Loading branch information
makenowjust authored and Martin Verzilli committed Jul 9, 2017
1 parent d803e78 commit b3c8f87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
@@ -1230,6 +1230,9 @@ describe "Parser" do
it_parses %(asm("nop" :: "b"(1), "c"(2) : "eax", "ebx"\n: "volatile", "alignstack"\n,\n"intel"\n)),"nop", inputs: ["b", 1.int32),"c", 2.int32)], clobbers: %w(eax ebx), volatile: true, alignstack: true, intel: true)
it_parses %(asm("nop" :::: "volatile")),"nop", volatile: true)

assert_syntax_error %q(asm("nop" ::: "#{foo}")), "interpolation not allowed in asm clobber"
assert_syntax_error %q(asm("nop" :::: "#{volatile}")), "interpolation not allowed in asm option"

it_parses "foo begin\nbar do\nend\nend",, "foo",[, "bar", block:] of ASTNode))
it_parses "foo do\nend",, "foo", args: [, "bar")] of ASTNode, block:
it_parses "return do\nend",, "bar", block:
@@ -4709,7 +4709,7 @@ module Crystal
intel = false
while true
location = @token.location
option = parse_string_without_interpolation("asm clobber")
option = parse_string_without_interpolation("asm option")
case option
when "volatile"

0 comments on commit b3c8f87

Please sign in to comment.