Skip to content

Commit 25eef3e

Browse files
authored
migrate NAPI front-end to WASM and ESM (#1120)
See the added changesets for the specific API changes/additions. Additionally, this PR: - deprecates/removes NAPI build/pipeline. - adds `jco` as a sub-module to the repo. - deletes the platform-specific packages, as we now just need one. Closes #410 Closes #570 Closes #573 Closes #816 Closes #987
1 parent 9126cda commit 25eef3e

450 files changed

Lines changed: 9668 additions & 16111 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/calm-ghosts-melt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/slang": minor
3+
---
4+
5+
migrate NAPI front-end to WASM and ESM

.changeset/cold-emus-arrive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/slang": minor
3+
---
4+
5+
add `TerminalKindExtensions.is_valid()` API to distinguish correctly-parsed and erroneous nodes

.changeset/config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
33
"access": "public",
44
"baseBranch": "main",
5-
"changelog": ["./custom-changelog-generator.js", { "repo": "NomicFoundation/slang" }],
6-
"fixed": [["@nomicfoundation/slang", "@nomicfoundation/slang-*"]]
5+
"changelog": ["@changesets/changelog-github", { "repo": "NomicFoundation/slang" }]
76
}

.changeset/custom-changelog-generator.js

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/slang": patch
3+
---
4+
5+
change `Parser::new()` constructor to `Parser::create()` static method.

.changeset/spotty-pigs-beg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/slang": minor
3+
---
4+
5+
unify API methods on `TerminalNode` and `NonTerminalNode`, and add type assertions and guards to both types

.changeset/stale-spoons-join.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/slang": minor
3+
---
4+
5+
expose edges and edge labels on CST nodes via `Node.children()` method. This allows distinguishing between children of the same node based on their label/role in the parent, even if they have the same kind.

.changeset/unlucky-tables-carry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/slang": minor
3+
---
4+
5+
add `TerminalNode.id` and `Nonterminal.id` properties to get a numeric ID that can be used in indexing/comparison at runtime.

.changeset/wicked-jobs-rest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/slang": minor
3+
---
4+
5+
add `TerminalKindExtensions.is_trivia()` API to distinguish between trivia nodes and other contentful nodes

.cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/v5.19.2/cspell.schema.json",
33
"language": "en-US",
44
"files": ["**/*.md"],
5-
"ignorePaths": ["**/generated/**", "CHANGELOG.md"],
5+
"ignorePaths": ["submodules/**", "**/generated/**", "CHANGELOG.md"],
66
"ignoreWords": [
77
// Alphabetically sorted list of "allowed" words to ignore:
88
"abicoder",
99
"codegen",
10+
"contentful",
1011
"devcontainer",
1112
"doxygen",
1213
"ebnf",

0 commit comments

Comments
 (0)