Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/compiler/parser/parser_spec.cr
Original file line number Diff line number Diff line change
@@ -836,6 +836,9 @@ describe "Parser" do
it_parses "begin\n/ /\nend", Expressions.new([regex(" ")] of ASTNode)
it_parses "/\\//", regex("/")
it_parses "%r(/)", regex("/")
it_parses "a()/3", Call.new("a".call, "/", 3.int32)
it_parses "a() /3", Call.new("a".call, "/", 3.int32)
it_parses "a.b() /3", Call.new(Call.new("a".call, "b"), "/", 3.int32)

it_parses "1 =~ 2", Call.new(1.int32, "=~", 2.int32)
it_parses "1.=~(2)", Call.new(1.int32, "=~", 2.int32)
1 change: 1 addition & 0 deletions src/compiler/crystal/syntax/parser.cr
Original file line number Diff line number Diff line change
@@ -3892,6 +3892,7 @@ module Crystal
end
end
end_location = token_end_location
@wants_regex = false
next_token_skip_space
end

0 comments on commit 83f9aec

Please sign in to comment.