Skip to content

v.0.1.5#14

Merged
qraqras merged 2 commits intomainfrom
dev
Mar 22, 2026
Merged

v.0.1.5#14
qraqras merged 2 commits intomainfrom
dev

Conversation

@qraqras
Copy link
Copy Markdown
Owner

@qraqras qraqras commented Mar 22, 2026

No description provided.

qraqras added 2 commits March 22, 2026 13:20
Add GOOGLE_YIELDS and NUMPY_YIELDS as dedicated SyntaxKind variants,
separate from GOOGLE_RETURNS and NUMPY_RETURNS.

Previously, both Returns and Yields sections were represented by the same
node kind (GOOGLE_RETURNS / NUMPY_RETURNS), making it impossible to
distinguish them in the syntax tree without inspecting token text. This
is problematic for linter use cases where the kind alone should suffice.

Changes:
- syntax.rs: add GOOGLE_YIELDS, NUMPY_YIELDS to SyntaxKind (enum,
  is_node(), name())
- parse/google/parser.rs: Yields section body now emits GOOGLE_YIELDS nodes
- parse/numpy/parser.rs: add SectionBody::Yields variant, build_yields_node,
  process_yields_line to emit NUMPY_YIELDS nodes
- parse/google/nodes.rs: add GoogleYields wrapper; GoogleSection::yields()
- parse/numpy/nodes.rs: add NumPyYields wrapper; NumPySection::yields()
- parse/google/to_model.rs: use section.yields() for Yields sections
- parse/numpy/to_model.rs: use section.yields() for Yields sections
- parse/google.rs, parse/numpy.rs: re-export new wrapper types
- tests: update helpers and test_yields_section_body_variant to use yields()
- bindings/python: add PyGoogleYields, PyNumPyYields, GOOGLE_YIELDS,
  NUMPY_YIELDS, yields getter on GoogleSection/NumPySection; update .pyi
@qraqras qraqras self-assigned this Mar 22, 2026
@qraqras qraqras merged commit 7aadba8 into main Mar 22, 2026
2 checks passed
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.

1 participant