Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: peek_token #30

Open
mhanberg opened this issue May 1, 2024 · 2 comments
Open

bug: peek_token #30

mhanberg opened this issue May 1, 2024 · 2 comments

Comments

@mhanberg
Copy link
Contributor

mhanberg commented May 1, 2024

** (FunctionClauseError) no function clause matching in Spitfire.peek_token/1
    (spitfire 0.1.0) lib/spitfire.ex:2167: Spitfire.peek_token(%{tokens: [nil | :eot], literal_encoder: #Function<49.133785804/2 in NextLS.handle_request/2>, errors: [{[line: 4, column: 13], "missing closing bracket for list"}], current_token: {:fake_closing_bracket, nil}, fuel: 150, peek_token: nil, nesting: 1})
    (spitfire 0.1.0) lib/spitfire.ex:295: anonymous fn/7 in Spitfire.parse_expression/6
    (spitfire 0.1.0) lib/spitfire/while.ex:49: Spitfire.While.do_while/2
    (spitfire 0.1.0) lib/spitfire.ex:1875: Spitfire.parse_identifier/1
    (spitfire 0.1.0) lib/spitfire.ex:283: Spitfire.parse_expression/6
    (spitfire 0.1.0) lib/spitfire.ex:936: anonymous fn/1 in Spitfire.parse_do_block/2
    (spitfire 0.1.0) lib/spitfire/while.ex:5: Spitfire.While2.recurse/3
    (spitfire 0.1.0) lib/spitfire/while.ex:10: Spitfire.While2.recurse/3
@mhanberg
Copy link
Contributor Author

mhanberg commented May 2, 2024

I believe this is related to the tokenizer not handling the follow type of code

iex(5)> :elixir_tokenizer.tokenize(~c"[foo:]", 1, 1, [])
{:error,
 {[line: 1, column: 2], ~c"keyword argument must be followed by space after: ",
  ~c"foo:"}, ~c"foo:]", [], ["[": {1, 1, nil}]}

@mhanberg
Copy link
Contributor Author

mhanberg commented May 2, 2024

Related to #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant