Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
strategy:
matrix:
toolchain:
- 1.80.0 # MSRV
- 1.90.0 # MSRV
- stable
- nightly

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Install tools
run: |
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
run: cargo clippy --all-targets -- -D warnings

- name: Run tests
run: cargo test -p source_gen -p poc-plpgsql-analyzer --features coverage-tests
run: cargo test -p source_gen -p poc-plpgsql-analyzer --features coverage-tests

- name: Generate rustdoc
run: cargo doc --no-deps
Expand All @@ -64,7 +64,7 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Install tools
run: |
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Build using wasm-pack
run: wasm-pack build --release --target nodejs

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wasm-library
path: pkg/
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Setup Node
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typescript-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Install tools
run: |
Expand Down
22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ build = true
crate-type = ["cdylib", "rlib"]

[dependencies]
indexmap = "^1.9.1"
indexmap = "^2.12.0"
lazy_static = "^1.4.0"
logos = "^0.12.1"
num-derive = "^0.3.3"
logos = "^0.15.1"
num-derive = "^0.4.2"
num-traits = "^0.2.15"
rowan = "^0.15.10"
serde-wasm-bindgen = "^0.5.0"
rowan = "^0.16.1"
serde-wasm-bindgen = "^0.6.5"
text-size = "^1.1.0"
thiserror = "^1.0.35"
thiserror = "^2.0.17"
tsify = "0.4.3"
unicode-width = "0.1.10"
unicode-width = "^0.2.2"
wasm-bindgen = "^0.2.86"

[dependencies.serde]
Expand All @@ -40,12 +40,12 @@ path = "./crates/source_gen"
path = "./crates/definitions"

[dev-dependencies]
datatest-stable = "^0.1.3"
datatest-stable = "^0.3.3"
expect-test = "^1.4.0"
heck = "0.4.1"
heck = "^0.5.0"
pretty_assertions = "^1.3.0"
proc-macro2 = "1.0.57"
quote = "1"
proc-macro2 = "^1.0.57"
quote = "^1"

[profile.release]
lto = true
Expand Down
4 changes: 1 addition & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ To contribute to this project, follow these steps:

## Requirements

* A working Rust toolchain using [rustup](https://rustup.rs/) (at least 1.80.0)
* A working Rust toolchain using [rustup](https://rustup.rs/) (at least 1.90.0)
* [`wasm-pack`](https://rustwasm.github.io/wasm-pack/installer/) (for building WebAssembly)

## Getting started
Expand Down Expand Up @@ -113,5 +113,3 @@ cargo doc --document-private-items
It is endorsed to install the `wasm-opt` tool from the
[`binaryen`](https://github.com/WebAssembly/binaryen) project,
which `wasm-pack` will automatically use to optimize the generated WASM code.


6 changes: 3 additions & 3 deletions crates/definitions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
heck = "0.5.0"
proc-macro2 = "1.0.86"
quote = "1.0.36"
heck = "^0.5.0"
proc-macro2 = "^1.0.86"
quote = "^1.0.36"
4 changes: 2 additions & 2 deletions crates/definitions/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ pub const SYNTAX_NODES: &'_ [SyntaxNode<'_>] = &[
S!("element_spec", "A node that contains an element_spec"),
S!("else_expression", "A node containing an else expression"),
S!("error", "An error token with a cause"),
S!("exclam", "An exclamation mark `!`"),
S!("exclam", "An exclamation mark `!`"),
S!("execute_immediate_stmt", "A node that contains a full EXECUTE IMMEDIATE statement"),
S!("exit_stmt", "A node that contains a full EXIT statement"),
S!("expression", "Holds a generic SQL logic/arithmetic expression"),
Expand All @@ -475,7 +475,7 @@ pub const SYNTAX_NODES: &'_ [SyntaxNode<'_>] = &[
S!("for_loop", "A node containing a FOR LOOP"),
S!("func_decl_in_type", "A node containing a func_decl_in_type"),
S!("function", "A node that marks a full CREATE [..] FUNCTION block"),
S!("function_header", "A node that marks a FUNCTION header with params and return type"),
S!("function_header", "A node that marks a FUNCTION header with params and return type"),
S!("function_invocation", "An invocation of a function, from the identifier and the opening bracket to the closing bracket"),
S!("hier_ids", "A node containing hier_ids"),
S!("function_spec", "A node containing a function_spec"),
Expand Down
9 changes: 3 additions & 6 deletions crates/definitions/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Generates the [`crate::TokenKind`] enum

use heck::ToUpperCamelCase;
use proc_macro2::{Ident, Literal, Punct, Spacing, TokenStream};
use proc_macro2::{Ident, Literal, TokenStream};
use quote::__private::ext::RepToTokensExt;
use quote::{format_ident, quote};

Expand Down Expand Up @@ -62,11 +62,8 @@ impl Token<'_> {
let char = self.shorthand.next().unwrap();
quote! {#char}
} else {
let char = self
.shorthand
.chars()
.map(|c| Punct::new(c, Spacing::Joint));
quote! { #(#char)* }
let tokens: TokenStream = self.shorthand.parse().unwrap();
quote! { #tokens }
}
};
let variant = self.to_ident();
Expand Down
14 changes: 7 additions & 7 deletions crates/source_gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
logos = "0.14.0"
num-derive = "0.4.2"
num-traits = "0.2.19"
rowan = "0.15.15"
logos = "^0.15.0"
num-derive = "^0.4.2"
num-traits = "^0.2.19"
rowan = "^0.16.1"

[build-dependencies]
definitions = { path = "../definitions" }
quote = "1.0.36"
heck = "0.5.0"
proc-macro2 = "1.0.86"
quote = "^1.0.36"
heck = "^0.5.0"
proc-macro2 = "^1.0.86"
2 changes: 1 addition & 1 deletion src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ macro_rules! typed_syntax_token {
// Needed so that submodules can import [`typed_syntax_node`] and
// [`typed_syntax_token`]
/// as `super::typed_syntax_{node,token}`.
pub(crate) use {typed_syntax, typed_syntax_node, typed_syntax_token};
pub(crate) use {typed_syntax, typed_syntax_node};

/// Represents a interface for typed AST tokens, akin to [`AstNode`].
pub trait AstToken {
Expand Down
2 changes: 1 addition & 1 deletion src/grammar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn parse_param(p: &mut Parser) {
///
/// * `p`: The parser struct
/// * `expected_components`: A range of the minimum and maximum expected components that should be present in the identifier.
/// To allow an optional identifier, pass a range starting with `0`.
/// To allow an optional identifier, pass a range starting with `0`.
///
/// returns: ()
///
Expand Down
24 changes: 7 additions & 17 deletions tests/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,10 @@ fn test_parse_coverage(path: &Path) -> datatest_stable::Result<()> {
Ok(())
}

datatest_stable::harness!(
test_parse_coverage,
"tests/procedure",
r"^(.*).ora\.sql$",
test_parse_coverage,
"tests/function",
r"^(.*)\.sql$",
test_parse_coverage,
"tests/dql",
r"(.*)\.sql$",
test_parse_coverage,
"tests/trigger",
r"(.*)\.sql$",
test_parse_coverage,
"tests/view",
r"(.*)\.sql$"
);
datatest_stable::harness! {
{ test = test_parse_coverage, root = "tests/procedure", pattern = r"^(.*).ora\.sql$" },
{ test = test_parse_coverage, root = "tests/function", pattern = r"^(.*)\.sql$" },
{ test = test_parse_coverage, root = "tests/dql", pattern = r"(.*)\.sql$" },
{ test = test_parse_coverage, root = "tests/trigger", pattern = r"(.*)\.sql$" },
{ test = test_parse_coverage, root = "tests/view", pattern = r"(.*)\.sql$" },
}
6 changes: 0 additions & 6 deletions tests/typescript/jest.config.js

This file was deleted.

Loading
Loading