Skip to content

Conversation

@jrentlez
Copy link
Contributor

@jrentlez jrentlez commented Nov 26, 2025

This PR implements RFC 0020 with a few caveats:

  • changed row access syntax from row["column"] to row cellInColumn "column"
  • There is no new SheetRow valuetype, I decided to use Collection<text>

Other changes unrelated to the RFC:

  • The properties skipLeadingWhitespace and skipTrailingWhitespace have been removed from TableInterpreter because this can now be part of the parsing transform. We already have a replace operator.

@jrentlez
Copy link
Contributor Author

@georg-schwarz do you agree with the design so far? I had to introduce a new Valuetype ValuetypeDefinition to make this work, but I think its OK, we already have the similar ValuetypeAssignment

@georg-schwarz
Copy link
Member

Do you see any major negative aspects of this design?
At first glance, it looks good to me!

@jrentlez jrentlez force-pushed the table-schema-value-type-impl branch from ea85b57 to 41468a7 Compare January 3, 2026 08:34
@jrentlez jrentlez force-pushed the table-schema-value-type-impl branch from 2e1aec6 to 3aaf914 Compare January 6, 2026 22:09
@jrentlez jrentlez force-pushed the table-schema-value-type-impl branch from 3aaf914 to 2eaa215 Compare January 7, 2026 08:49
@jrentlez jrentlez changed the title RFC0020 implementation (partial) RFC0020 implementation Jan 7, 2026
@jrentlez jrentlez self-assigned this Jan 7, 2026
@jrentlez jrentlez marked this pull request as ready for review January 7, 2026 09:11
@jrentlez jrentlez requested a review from georg-schwarz January 7, 2026 09:11
jrentlez and others added 3 commits January 12, 2026 10:44
Co-authored-by: Georg Schwarz <dev@georg-schwarz.com>
Co-authored-by: Georg Schwarz <dev@georg-schwarz.com>
Copy link
Contributor

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 implements RFC0020, introducing a new syntax for table parsing in Jayvee. The implementation replaces the inline column definitions in TableInterpreter with a valuetype-based schema definition and a parsing transform that uses the new cellInColumn operator to access sheet cells by column name or index.

Changes:

  • Replaced columns: [...] array syntax with columns: ValueType and parseWith: Transform properties in TableInterpreter
  • Introduced new cellInColumn binary operator and TableRowLiteral syntax for transform expressions
  • Removed skipLeadingWhitespace and skipTrailingWhitespace properties from TableInterpreter

Reviewed changes

Copilot reviewed 72 out of 72 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
expression.langium Added TableRowLiteral grammar and cellInColumn operator
TableInterpreter.jv Updated documentation and properties to use valuetype schema
GTFS*.jv files Migrated all GTFS interpreters to new syntax with valuetypes and transforms
table-interpreter-executor.ts Refactored to use transform-based parsing instead of direct column definitions
constraint-executor.ts Updated to work with Map-based values instead of single values
table.ts Changed TableRow from Record to Map, added constraint checking
value-type-definition-value-type.ts Added new primitive value type for valuetype definitions
cell-in-column-operator-evaluator.ts Implemented evaluator for new cellInColumn operator
Example files (cars.jv, electric-vehicles.jv, gtfs-rt.jv) Updated to use new syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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