Skip to content

Commit 6c0452e

Browse files
committed
test: add absinthe comma-assignment regression case
Add a focused parser parity regression for the snippet that triggered the CI crash: comma = ascii_char([?,]) This comes from absinthe-graphql/absinthe lexer code and protects against regressions where an identifier named `comma` can produce malformed intermediate lhs state during infix parsing.
1 parent 60100d1 commit 6c0452e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/spitfire_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,9 @@ defmodule SpitfireTest do
23372337
assert Spitfire.parse("%e.(){}") == s2q("%e.(){}")
23382338
assert Spitfire.parse("%e.(1){}") == s2q("%e.(1){}")
23392339
assert Spitfire.parse("%e.(a, b){}") == s2q("%e.(a, b){}")
2340+
2341+
# Regression from absinthe-graphql/absinthe lexer
2342+
assert Spitfire.parse("comma = ascii_char([?,])") == s2q("comma = ascii_char([?,])")
23402343
end
23412344
end
23422345

0 commit comments

Comments
 (0)