Repository navigation
Conversation
The lexy grammar accepted both 'single' and "double" quoted strings (dsl::single_quoted | dsl::quoted in any_types.hpp). The hand-written tokenizer from BehaviorTree#1099 only recognizes single quotes, so scripts that worked in 4.8, such as label := "item "..index, now fail with Invalid token '"'. Recognize both delimiters and require the closing quote to match the opening one. Fixes BehaviorTree#1305 Co-Authored-By: David Vadovszki <david.vadovszki@picknik.ai>
dvadovsz
marked this pull request as ready for review
December 2, 2026 23:46
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1305.
The tokenizer now accepts
"..."as well as'...', and the closing quote must match the opening one. A string can then hold the other kind of quote:'say "hello"'and"it's ready"both work. This matches the lexy grammar through 4.8.4, which accepteddsl::single_quoted(...) | dsl::quoted(...).Tests in
script_parser_test.cpp:StringLiteralQuotes: both delimiters, empty strings, a string holding the other quote, concatenation of the two kinds, and rejection of unterminated and mismatched quotes.DoubleQuotedStringsInXml:"strings in aScriptand in_failureIfand_successIfpreconditions.Both fail on
masterand pass with the fix. pre-commit and clang-tidy-21 are clean. There is no API or ABI change. Scripts that use only single quotes behave as before.