powerquery-parser icon indicating copy to clipboard operation
powerquery-parser copied to clipboard

[Enhancement] Add Parser Support for Invalid Syntax Literals

Open bgribaudo opened this issue 4 years ago • 3 comments

Describe the solution you'd like Power Query expressions can contain "invalid syntax literals" (unsure the official name), a syntax construct in the form of #!" … " which is not mentioned in the official language specification.

To enable this parser to fully parse the section documents created by Microsoft Excel and Power BI, both of which can output invalid syntax literals, would it make sense to extend the parser to support these literals?

Example (pulled verbatim from a Power BI file):

section Section1;

shared Query1 = let
    Source = #!"let a"
in
    Source;

Additional context For more details on these literals, see https://github.com/MicrosoftDocs/powerquery-docs/issues/12.

bgribaudo avatar May 13 '20 11:05 bgribaudo

It's not the highest priority but I don't think it'll be difficult to implement.. I'll look into it once I'm back in office.

JordanBoltonMN avatar May 13 '20 17:05 JordanBoltonMN

It should be relatively easy to implement, but is marked as low priority as users won't run into a the verbatim literal in a regular work flow.

JordanBoltonMN avatar May 20 '20 16:05 JordanBoltonMN

Sounds good. Thank you, @JordanBoltonMN!

bgribaudo avatar May 20 '20 18:05 bgribaudo