Skip to content

Commit

Permalink
generate typescript string enums for CST kinds (#501)
Browse files Browse the repository at this point in the history
Closes #467
  • Loading branch information
OmarTawfik committed Jun 17, 2023
1 parent 73ddac9 commit cb221fe
Show file tree
Hide file tree
Showing 8 changed files with 651 additions and 645 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-cooks-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"changelog": minor
---

generate typescript string enums for CST kinds
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ indexmap = { version = "1.9.2", features = ["serde"] }
indicatif = { version = "0.17.3" }
Inflector = { version = "0.11.4" }
itertools = { version = "0.10.5" }
napi = { version = "2.12.1", features = ["compat-mode", "napi8", "serde-json"] }
napi = { version = "2.13.1", features = ["compat-mode", "napi8", "serde-json"] }
napi-build = { version = "2.0.1" }
napi-derive = { version = "2.12.2" }
napi-derive = { version = "2.13.0" }
proc-macro2 = { version = "1.0.53" }
quote = { version = "1.0.26" }
rayon = { version = "1.7.0" }
Expand Down
6 changes: 3 additions & 3 deletions crates/codegen/syntax/src/typescript_lib_code_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl CodeGenerator {
use napi::bindgen_prelude::*;
use napi_derive::napi;

#[napi]
#[napi(string_enum)]
#[derive(
Debug,
PartialEq,
Expand All @@ -163,7 +163,7 @@ impl CodeGenerator {
)]
#token_kinds

#[napi]
#[napi(string_enum)]
#[derive(
Debug,
PartialEq,
Expand All @@ -175,7 +175,7 @@ impl CodeGenerator {
)]
#rule_kinds

#[napi]
#[napi(string_enum)]
#[derive(
Debug,
PartialEq,
Expand Down
6 changes: 3 additions & 3 deletions crates/solidity/outputs/npm/crate/src/generated/kinds.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/solidity/outputs/npm/package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"./syntax/parser": "./src/syntax/parser/index.js"
},
"devDependencies": {
"@napi-rs/cli": "2.15.2",
"@napi-rs/cli": "2.16.1",
"prettier": "2.8.6"
},
"optionalDependencies": {
Expand Down
Loading

0 comments on commit cb221fe

Please sign in to comment.