Skip to content

Commit 8920cc1

Browse files
committed
Fix case clause error on tokenizer
1 parent 9b480f9 commit 8920cc1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/elixir/src/elixir_tokenizer.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ handle_strings(T, Line, Column, H, Scope, Tokens) ->
794794
Token = {kw_identifier, {Line, Column - 1, nil}, Atom},
795795
tokenize(Rest, NewLine, NewColumn + 1, NewScope, [Token | Tokens]);
796796
{error, Reason} ->
797-
{error, Reason, Rest, Tokens}
797+
error(Reason, Rest, NewScope, Tokens)
798798
end;
799799

800800
{ok, Unescaped} ->

lib/elixir/test/elixir/kernel/parser_test.exs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,12 @@ defmodule Kernel.ParserTest do
11361136

11371137
assert_syntax_error(
11381138
["atom length must be less than system limit: "],
1139-
~s[:"#{atom}"]
1139+
~s{:"#{atom}"}
1140+
)
1141+
1142+
assert_syntax_error(
1143+
["atom length must be less than system limit: "],
1144+
~s{["#{atom}": 123]}
11401145
)
11411146
end
11421147
end

0 commit comments

Comments
 (0)