gsimardnet / PowerQueryNet

Run M Language (Power Query Formula Language) from anywhere.
MIT License
189 stars 32 forks source link

Trailing Comments Cause Parsing Error #34

Open alazyworkaholic opened 2 years ago

alazyworkaholic commented 2 years ago

Trailing comments in a PQ document can cause an error (I tested by adding comments to one of a few pq files in a folder). If you have

let
    ...
in Result
//My Trailing Comment

you get Microsoft.Data.Mashup.MashupExpressionException (0x80004005): Token Semicolon expected. Start position: (209, 1). End position (209, 7).

Interestingly, one can avoid the error by writing a semicolon after the final in statement: let ... in Result; //My Trailing Comment does not cause an error.