bglgwyng
0ad40ec263
refactor: extract symbol ID generation into dedicated module
2025-11-09 18:58:27 +09:00
bglgwyng
e029188319
test: update node type tests to use actual symbol IDs
2025-11-09 17:29:30 +09:00
bglgwyng
ff4c91a614
fix: fix grammar conflicts in test cases for parsing table generation
2025-11-09 17:14:00 +09:00
bglgwyng
ab9b098aad
refactor: extract grammar introspection into separate module
2025-11-09 16:19:49 +09:00
bglgwyng
d2a2b4005a
feat: add symbol_id field to node types schema
2025-11-07 17:33:56 +09:00
bglgwyng
04420e4b51
refactor: remove unused JSONOutput and GeneratedParser structs
2025-11-07 17:29:25 +09:00
bglgwyng
21c9f9ae4f
refactor: change symbol_ids to store both string and numeric IDs
...
- Modified symbol_ids HashMap to store tuples of (String, u16) instead of just String
- Updated symbol ID generation to assign numeric IDs sequentially (0 for end symbol, then 1, 2, 3...)
- Changed all symbol_ids access patterns throughout codebase to use tuple destructuring (.0 for string, .1 for numeric)
- Updated node_types.json to use numeric u16 symbol_id instead of String
2025-11-07 17:29:05 +09:00
bglgwyng
8238c36f5f
style: format
2025-11-07 16:47:08 +09:00
bglgwyng
4519e2b8cc
feat: add symbol_id field to node type JSON output
...
- Added symbol_id as optional field in NodeTypeJSON struct for tracking grammar symbols
- Threaded symbol_ids HashMap through generate_node_types_json function to populate symbol IDs
- Updated all test assertions to include symbol_id: None for backward compatibility
2025-11-07 16:46:52 +09:00
bglgwyng
b7d85668fe
refactor: extract grammar introspection into separate function
...
- Consolidated grammar processing logic into new `introspect_grammar` function
- Removed intermediate `GeneratedParser` and `JSONOutput` structs in favor of direct `GrammarIntrospection` struct
- Simplified code generation flow by separating grammar analysis from code rendering
2025-11-07 16:17:28 +09:00
bglgwyng
3b8a653167
refactor: extract symbol ID generation and helper functions
...
- Moved symbol ID generation logic out of renderer initialization into standalone function
- Extracted sanitize_identifier and metadata_for_symbol as reusable helper functions
- Symbol IDs now computed before rendering and passed to renderer constructor
2025-11-07 11:57:39 +09:00
dependabot[bot]
13d4db8bb4
build(deps): bump the cargo group across 1 directory with 6 updates
...
Bumps the cargo group with 6 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.2.43` | `1.2.44` |
| [clap](https://github.com/clap-rs/clap ) | `4.5.50` | `4.5.51` |
| [clap_complete](https://github.com/clap-rs/clap ) | `4.5.59` | `4.5.60` |
| [clap_complete_nushell](https://github.com/clap-rs/clap ) | `4.5.9` | `4.5.10` |
| [etcetera](https://github.com/lunacookies/etcetera ) | `0.10.0` | `0.11.0` |
| [wasmparser](https://github.com/bytecodealliance/wasm-tools ) | `0.229.0` | `0.240.0` |
Updates `cc` from 1.2.43 to 1.2.44
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.43...cc-v1.2.44 )
Updates `clap` from 4.5.50 to 4.5.51
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.50...clap_complete-v4.5.51 )
Updates `clap_complete` from 4.5.59 to 4.5.60
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.59...clap_complete-v4.5.60 )
Updates `clap_complete_nushell` from 4.5.9 to 4.5.10
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete_nushell-v4.5.9...clap_complete_nushell-v4.5.10 )
Updates `etcetera` from 0.10.0 to 0.11.0
- [Release notes](https://github.com/lunacookies/etcetera/releases )
- [Commits](https://github.com/lunacookies/etcetera/compare/v0.10.0...v0.11.0 )
Updates `wasmparser` from 0.229.0 to 0.240.0
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases )
- [Commits](https://github.com/bytecodealliance/wasm-tools/commits )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.44
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap
dependency-version: 4.5.51
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap_complete
dependency-version: 4.5.60
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: clap_complete_nushell
dependency-version: 4.5.10
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: etcetera
dependency-version: 0.11.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo
- dependency-name: wasmparser
dependency-version: 0.240.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 16:08:54 +01:00
Will Lillis
419a5a7305
fix(generate): don't short-circuit within extend_sorted
2025-11-03 01:22:29 -05:00
Will Lillis
c7b5f89392
feat(xtask): generate JSON schema for cli TestSummary
2025-11-02 21:08:55 -05:00
Will Lillis
d546e28abf
fix(cli): mark report_states_for_rule and json/json_summary flags
...
for `generate` command as conflicting
2025-11-02 21:08:55 -05:00
WillLillis
86e2fd2337
fix(cli): correct behavior of parse --stat and --json-summary flags
2025-11-02 21:08:55 -05:00
WillLillis
ff255a2354
test: add coverage for new test aggregation method
2025-11-02 21:08:55 -05:00
WillLillis
fe67521b3d
refactor(cli)!: deprecate json flags in favor of json-summary
2025-11-02 21:08:55 -05:00
WillLillis
f02d7e7e33
feat(test): display test results in JSON format
2025-11-02 21:08:55 -05:00
WillLillis
6a8676f335
refactor(test): generalize printing of test diff keys and diffs
2025-11-02 21:08:55 -05:00
WillLillis
944386d25f
refactor(test): clean up test filtering logic
...
Also, only update the expected output of a case when it is skipped if
the `update` flag has been passed
2025-11-02 21:08:55 -05:00
Will Lillis
ef03a3f8fe
fix(ci): correct mdbook release url
2025-11-02 18:37:09 -05:00
Christian Clason
18a5243933
ci(docs): pin mdbook to latest release
2025-11-02 18:07:47 -05:00
Christian Clason
8444cc3deb
fix(docs): remove multilingual config field
...
Problem: "deploy docs" always pulls in the `latest` release of `mdbook`,
which now is a v0.5.0 prerelease with breaking changes -- including
removing an (apparently unused) `multilingual` config field in the TOML
that is now an error (another breaking change).
Solution: Delete the line. Add `workflow_dispatch` to the docs workflow
in case follow-up changes are needed; see
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#05-migration-guide
2025-11-02 18:07:47 -05:00
Will Lillis
097c2d4f05
fix(cli): remove --emit=lib generate option
...
This also replaces the `--emit` option with an `--no-parser` flag. The
default value is false, meaning a parser is still generated by default.
2025-11-02 10:26:28 +01:00
WillLillis
b8f52210f9
perf: reduce needless allocations
2025-10-30 18:24:42 +01:00
WillLillis
ecc787e221
fix(test): correct language typo in test name
2025-10-30 18:24:42 +01:00
Christian Clason
6188010f53
build(deps): bump rquickjs to v0.10.0
2025-10-29 18:30:25 -04:00
Christian Clason
70cde4a110
ci(dependabot): only update patch releases for cargo
2025-10-29 18:30:25 -04:00
Christian Clason
77363a65c2
build(deps): cargo update
2025-10-29 18:30:25 -04:00
dependabot[bot]
605e580063
ci: bump the actions group across 1 directory with 3 updates
...
Bumps the actions group with 3 updates in the / directory: [actions/upload-artifact](https://github.com/actions/upload-artifact ), [actions/download-artifact](https://github.com/actions/download-artifact ) and [actions/setup-node](https://github.com/actions/setup-node ).
Updates `actions/upload-artifact` from 4 to 5
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5 )
Updates `actions/download-artifact` from 5 to 6
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6 )
Updates `actions/setup-node` from 5 to 6
- [Release notes](https://github.com/actions/setup-node/releases )
- [Commits](https://github.com/actions/setup-node/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
- dependency-name: actions/download-artifact
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
- dependency-name: actions/setup-node
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 09:23:50 +01:00
WillLillis
a2f2b16acb
fix(xtask): require version argument for bump-version command
2025-10-24 18:13:59 -04:00
Will Lillis
87d778a1c6
fix(rust): apply Self usage in struct definition lint
2025-10-24 17:50:28 -04:00
Will Lillis
e344837e35
fix(rust): minor cleanup in generate code
2025-10-24 17:50:28 -04:00
ObserverOfTime
bdee2c2dd3
ci: use macos-15-intel runner
...
The macos-13 runner will soon be removed.
2025-10-24 10:14:52 +02:00
dependabot[bot]
da5926d6f5
build(deps): bump the cargo group across 1 directory with 4 updates
...
Bumps the cargo group with 4 updates in the / directory: [anstyle](https://github.com/rust-cli/anstyle ), [cc](https://github.com/rust-lang/cc-rs ), [thiserror](https://github.com/dtolnay/thiserror ) and [widestring](https://github.com/VoidStarKat/widestring-rs ).
Updates `anstyle` from 1.0.11 to 1.0.13
- [Commits](https://github.com/rust-cli/anstyle/compare/v1.0.11...v1.0.13 )
Updates `cc` from 1.2.39 to 1.2.41
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.39...cc-v1.2.41 )
Updates `thiserror` from 2.0.16 to 2.0.17
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.16...2.0.17 )
Updates `widestring` from 1.2.0 to 1.2.1
- [Release notes](https://github.com/VoidStarKat/widestring-rs/releases )
- [Changelog](https://github.com/VoidStarKat/widestring-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/VoidStarKat/widestring-rs/compare/v1.2.0...v1.2.1 )
---
updated-dependencies:
- dependency-name: anstyle
dependency-version: 1.0.13
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: cc
dependency-version: 1.2.41
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: thiserror
dependency-version: 2.0.17
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: widestring
dependency-version: 1.2.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-10-14 11:00:03 +02:00
Will Lillis
b3bc7701cd
refactor(generate): make AliasMap use BTreeMap over HashMap
2025-10-12 15:56:30 -04:00
Will Lillis
262f1782cc
fix(generate): ensure deterministic iteration order for symbol aliases
...
while constructing node-types.json
2025-10-12 15:56:30 -04:00
WillLillis
00d172bf9f
fix(generate): correct display of precedence for
...
`--report-states-for-rule`
2025-10-12 15:56:12 -04:00
Will Lillis
ae54350c76
fix(generate): Add missing fields to NodeInfoJson sorting
...
This ensures a deterministic ordering for node-types.json
2025-10-11 14:25:52 -04:00
Will Lillis
3355825a68
fix(cli): don't load languages for build command
2025-10-07 17:21:09 -04:00
ObserverOfTime
7d0e029e37
chore: add schema for node-types.json
2025-10-05 09:57:23 +03:00
Mihai-Daniel Potirniche
0f5ccc4aba
Fix typo
2025-10-04 12:12:39 -04:00
ObserverOfTime
0cf6e7c507
fix(cli): prevent crash when parsing stdin
...
When we are parsing stdin via a pipe or heredoc, the source count is 0
(unsigned) so the XML output crashes while trying to subtract from it.
2025-10-03 19:24:58 +03:00
dependabot[bot]
1dc4804b6e
build(deps): bump the cargo group with 2 updates
...
Bumps the cargo group with 2 updates: [memchr](https://github.com/BurntSushi/memchr ) and [regex](https://github.com/rust-lang/regex ).
Updates `memchr` from 2.7.5 to 2.7.6
- [Commits](https://github.com/BurntSushi/memchr/compare/2.7.5...2.7.6 )
Updates `regex` from 1.11.2 to 1.11.3
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.11.2...1.11.3 )
---
updated-dependencies:
- dependency-name: memchr
dependency-version: 2.7.6
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
- dependency-name: regex
dependency-version: 1.11.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 02:57:21 -04:00
Amaan Qureshi
c5b22a1dc6
ci: split cross compilation and emscripten tag read
2025-10-01 02:57:04 -04:00
Amaan Qureshi
92efd26380
fix(loader): allow parallel compilation on windows
2025-10-01 02:57:04 -04:00
Amaan Qureshi
24c8feba3e
fix(bindings): fix root detection on windows
2025-09-28 08:40:02 -04:00
Amaan Qureshi
122493b717
style(cli): appease clippy
2025-09-28 05:54:28 -04:00
Amaan Qureshi
4edcca9850
style(loader): appease clippy
2025-09-28 05:54:28 -04:00