Skip to content

Conversation

pauloamed
Copy link
Contributor

@pauloamed pauloamed commented Sep 9, 2025

most of LOCs are testing

bool Infix::operator==(Infix const& other) const = default;

bool Nfix::operator==(Nfix const& other) const{
// FIXME: compile error
Copy link
Contributor Author

@pauloamed pauloamed Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sleepy-monax I'll need ur eyes here, pls

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaulting it works on my machine with 20.1.8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before merging, after the final review, ill switch to defaulting. its quicker than trying to set up the correct version

Copy link
Member

@Louciole Louciole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree with the concept, looks generally good

@sleepy-monax sleepy-monax requested a review from Copilot September 9, 2025 07:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for nth-child CSS pseudo-class selectors, implementing the ability to select elements based on their position among siblings. The implementation includes parsing of "An+B" expressions (like 2n+1, odd, even) and matching logic for various nth-child variants.

  • Implements CSS nth-child pseudo-class selector parsing and matching
  • Adds comprehensive AnB expression parsing for formulaic element selection
  • Extends DOM tree functionality to support filtered element indexing

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/css/selectors.xhtml Comprehensive test cases for nth-child pseudo-class selectors
src/vaev-engine/style/tests/test-select-spec.cpp Unit tests for AnB expression matching logic
src/vaev-engine/style/tests/test-parse-selectors.cpp Parser tests for AnB expressions and nth-child selectors
src/vaev-engine/style/selector.cpp Core implementation of AnB parsing and nth-child selector support
src/vaev-engine/style/selector-impl.cpp Equality operator implementations for selector types
src/vaev-engine/style/matcher.cpp Matching logic for nth-child pseudo-class selectors
src/vaev-engine/dom/tree.cpp DOM tree index functions with filtering support

@sleepy-monax sleepy-monax merged commit c2b859d into main Sep 9, 2025
4 checks passed
@sleepy-monax
Copy link
Member

Great work as always

@pauloamed pauloamed deleted the palm/nth-child branch September 10, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants