Repository navigation
Conversation
column_result_t pattern-matched each of the eleven arithmetic, bitwise and concatenation operator aliases, `is_assign_v` and `is_chainable_operand_v` were pattern specializations on `assign_t` and `conc_t`, and the unary operators had no trait - so ast_iterator never descended into a unary minus. - operators.h moves to ast/ and takes in the arithmetic and bitwise operator overloads from core_functions.h. - Each operator's tag declares the C++ type the operator yields as its `result_type`, which the operator node inherits; column_result_t reads it through the projection for all binary and unary operators alike. - New grammar traits `is_unary_operator` and `is_conc`; `is_assign` is one closed definition like `is_conc`, a binary operator carrying the tag; `is_chainable_operand_v` gets a SFINAE parameter and is enabled on `is_conc`. - ast_iterator, node_tuple and statement_serializer match the unary operators by trait. Fix: a unary minus is now walked into like the bitwise not already was, so the values bound and the tables referenced below it are no longer missed. Co-Authored-By: Claude Opus 5.5
trueqbit
force-pushed
the
refactor/consolidate-joins
branch
from
September 28, 2026 17:00
50bd6b0 to
117f9f4
Compare
trueqbit
force-pushed
the
refactor/operators-under-ast
branch
from
September 28, 2026 17:00
7732cd7 to
70022e6
Compare
…er-ast Co-Authored-By: Claude Opus 5.5
…er-ast dev (#1558) moved the overloaded arithmetic and bitwise operators from core.h into operators.h, as this branch did when moving operators.h to ast/operators.h; both sides appended the same block, which is kept once. Resolved: - ast/operators.h keeps this branch's includes, relative to ast/. - core_functions.h, from which this branch took the operators, is gone on dev, replaced by builtin/functions/. Co-Authored-By: Claude Opus 5.5
…er-ast Co-Authored-By: Claude Opus 5.5
…er-ast Co-Authored-By: Claude Opus 5.5
…er-ast Co-Authored-By: Claude Opus 5.5
trueqbit
marked this pull request as ready for review
October 7, 2026 18:57
…er-ast # Conflicts: # dev/ast/quoted_expression.h # include/sqlite_orm/sqlite_orm.h
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.
Stacked on #1551.
Summary
column_result_tpattern-matched each of the eleven operator aliases (conc_t,add_t…bitwise_or_t,unary_minus_t,bitwise_not_t),is_assign_vandis_chainable_operand_vwere defined by pattern specializations onassign_tandconc_t- the style the vocabulary document rules out -, and the unary operators had no trait at all.dev/operators.hmoves todev/ast/operators.h, and takes in the arithmetic and bitwise operator overloads (-x,+,-,*,/,%,~,<<,>>,&,|) fromcore_functions.h, where they had no business.add_string, …) declares the C++ type the operator yields as itsresult_type, which the operator node inherits.column_result_treads it throughresult_type_tfor all binary and unary operators - twelve specializations become one.is_unary_operatorandis_conc.is_assignbecomes anexterndeclaration with one closed definition, likeis_conc: a binary operator carrying the respective tag - checked on a binary operator only, since astd::tupleof tags derives from them too.is_chainable_operand_vgains a SFINAE parameter and is enabled onis_conc.ast_iterator,node_tupleandstatement_serializermatch the unary operators by trait.ast_iteratorhad a specialization forbitwise_not_tbut none forunary_minus_t, which was thus visited as a leaf - the values bound and the table referenced below a unary minus were missed.Test plan
tests/static_tests/expression_classification.cpp: new "operators" section -is_unary_operator,is_conc,is_assignpositive and negative (including tuples of tags),is_chainable_operand, theresult_typeof concatenation, arithmetic, bitwise and unary operators, and the node tuple of a unary minus.tests/ast_iterator_tests.cpp: new "unary operators" section - the operand of a unary minus and of a bitwise not is visited.tests/static_tests/operators_adl.cppand the operator serializer tests cover the moved overloads.🤖 Generated with Claude Code