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] Sequences using variables causes a parse error #186

Closed
ninmonkey opened this issue Aug 22, 2020 · 1 comment
Closed

[BUG] Sequences using variables causes a parse error #186

ninmonkey opened this issue Aug 22, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ninmonkey
Copy link

ninmonkey commented Aug 22, 2020

Expected behavior
Valid queries should not raise a a parse error. It runs as expected in Power BI.

Actual behavior

Expected to find a right brace <'}'>, but a keyword <'in'> was found insteadpowerquery(Error.Parse)

image

To Reproduce: Case 1

let
    start = 0, 
    end = 10,
    sequence = {start..end}
in
    sequence

Expected to find a right brace <'}'>, but a keyword <'in'> was found insteadpowerquery(Error.Parse)

To Reproduce: Case 2

let
    start = 10,
    Numbers = {start..10}
in 
    Numbers

Expected to find a right brace <'}'>, but a numeric literal was found insteadpowerquery(Error.Parse)

Working case

let
    end = 10,
    Numbers = {0..end}
in 
    Numbers
@ninmonkey ninmonkey added the bug Something isn't working label Aug 22, 2020
@ninmonkey ninmonkey changed the title [BUG] Sequences using varaibles [BUG] Sequences using variables causes a parse error Aug 22, 2020
@JordanBoltonMN
Copy link
Contributor

Found the issue. It's that the lexer is generating an identifier token start. which shouldn't be valid, as identifiers do not allow trailing commas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants