Closed micekdan closed 2 years ago
You cannot parse a document with multiple commands/queries in it that are separated by a blank line. These are considered entirely separate commands/queries that are just located in the same file. The query language grammar does not understand this concept. What does support it is the editor, Kusto Explorer, ADX, etc.
You can use the Editor.CodeScript class to break the document down into separate parts and it will parse each piece separately when you access each block's Service property. There is no easy way to get at the syntax model of each piece this way though, as this is meant as an abstraction for the editor. You can, instead, just use the CodeScript class to break the document down and then invoke the KustoCode.ParseAndAnalyze method for each block manually.
Hello, in our team we use single script file for multiple ingest commands like
This file however cannot be parsed correctly even if the commands are ended by a semicolon.
I think the culprit is in CommandGrammar.cs:172