Toml Parser is unable recover properly from missing Starting double quote #26394
Labels
Area/TOMLParser
TOML parser related issues
Team/DevTools
Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs )
Type/Bug
Description:
Toml String implementation uses ParserMode class to parse the String Content. The Starting double quote starts the mode and the ending double quote ends the parsing mode and reverts to the parsing mode back to default.
When the Starting double quote is missing, Lexer automatically recognizes the ending quote as the first quote and parse the trailing trivia as String content.
When the Starting double quotes are recovered from the Error Handler, the key-value pair recovers just fine but the remaining String content created by trailing trivia is not removed and it causes the parser to add/remove more tokens.
Steps to reproduce:
key = sdsd"
The text was updated successfully, but these errors were encountered: