{{ message }}
Remove lexy dependency, replace with hand-written tokenizer and Pratt parser#1099
Merged
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Implement BT::Scripting::tokenize() to replace the lexy-based tokenizer that was removed. Handles all token types: identifiers (with @ prefix for root blackboard vars), numbers (int/hex/real/exponent), single-quoted strings, two-char operators, and single-char operators/delimiters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add explicit != 0 for implicit int->bool conversions from ctype functions (readability-implicit-bool-conversion) - Value-initialize op variables in switch statements (cppcoreguidelines-init-variables) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tokenizer: - Extract scanHexNumber(), scanDecimalNumber(), matchTwoCharOp(), matchSingleCharOp() to reduce cognitive complexity of tokenize() - Use init-statement in if for identifier text variable (S6004) Parser: - Replace std::runtime_error with RuntimeError (S112) - Remove redundant lambda return type (S3574) - Catch RuntimeError instead of std::exception (S1181) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New test cases: - TokenizerEdgeCases: unterminated strings, hex errors (0x, 0xG), exponent errors (3e, 3e+), DotDot with numbers, empty/whitespace scripts - ChainedComparisons: 1<2<3, 3>2>1, mixed chains, chained equality - OperatorPrecedence: bitwise vs logical, parenthesized subexpressions - UnaryOperators: !, !!, ~, unary minus in expressions - TernaryExpressions: basic, with subexpressions, comparison conditions - MultipleStatements: extra semicolons, return value of last expression Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
acd4356 to
cb90c85
Compare
BillyONeal
added a commit
to BillyONeal/vcpkg
that referenced
this pull request
Feb 13, 2026
Remove CMAKE_DISABLE_FIND_PACKAGE_Curses because `Curses` does not exist in the sources at all. (They have one <curses.h> but no find_package for it...)
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.




Summary
src/script_tokenizer.cppimplementingBT::Scripting::tokenize()for all token types (identifiers with@prefix, numbers, strings, operators)std::from_charsfor double/float when available (__cpp_lib_to_chars_fp_formatting)Test plan
@-prefixed root variables pass🤖 Generated with Claude Code
Summary by CodeRabbit
Removed Features
Chores