Skip to content

selene reports a parse error when a statement is passed as a function argument #641

@ligurio

Description

@ligurio

selene reports parse_error with a Lua sample below:

$ cat parse_error1.lua 
local f = function() end
f(0LL + 1)
$ selene parse_error1.lua

error[parse_error]: unexpected token `(`
  ┌─ parse_error1.lua:2:2
  │
2 │ f(0LL + 1)
  │  ^ expected `)` to close function call

error[parse_error]: unexpected token `+`
  ┌─ parse_error1.lua:2:7
  │
2 │ f(0LL + 1)
  │       ^ unexpected expression when looking for a statement

error[parse_error]: unexpected token `+`
  ┌─ parse_error1.lua:2:7
  │
2 │ f(0LL + 1)
  │       ^ unexpected token, this needs to be a statement

Results:
0 errors
0 warnings
3 parse errors

selene 0.28.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions