PowerQueryNet icon indicating copy to clipboard operation
PowerQueryNet copied to clipboard

Trailing Comments Cause Parsing Error

Open alazyworkaholic opened this issue 2 years ago • 0 comments

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.

alazyworkaholic avatar Dec 29 '21 07:12 alazyworkaholic