Skip to content

Commit

Permalink
Merge branch 'master' into pp/add-ext
Browse files Browse the repository at this point in the history
  • Loading branch information
alixinne authored Nov 11, 2024
2 parents 14565ab + c0f26e7 commit b918722
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 33 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ jobs:
with:
fetch-depth: 0

- uses: cocogitto/[email protected]
with:
check-latest-tag-only: true
git-user: glsl-lang
git-user-email: [email protected]

- uses: actions/cache@v4
with:
key: ${{ runner.os }}
Expand All @@ -44,6 +38,12 @@ jobs:
- name: Check clippy lints
run: cargo clippy -- -D warnings -A clippy::result_large_err

- uses: cocogitto/[email protected]
with:
check-latest-tag-only: true
git-user: glsl-lang
git-user-email: [email protected]

test:
name: Test crate

Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## [Unreleased]

- - -
## v0.7.0 - 2024-11-11
#### Features
- **(parser)** add type_qualifier only in decls (#56) - (b71dd7b) - Yorkie Makoto
#### Miscellaneous Chores
- **(version)** v0.6.1 [skip ci] - (8759d96) - glsl-lang

- - -

## v0.6.1 - 2024-10-01
#### Bug Fixes
- **(transpiler)** append "precision" for precision decl (#53) - (1596970) - Yorkie Makoto
Expand Down
8 changes: 4 additions & 4 deletions lang-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang-cli"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -13,9 +13,9 @@ keywords = ["glsl", "language", "parser", "ast", "cli"]
categories = ["command-line-interface", "parser-implementations", "rendering"]

[dependencies]
glsl-lang = { version = "=0.6.1", features = ["lexer-v2-full"] }
glsl-lang-pp = { version = "=0.6.1" }
lang-util = "=0.6.1"
glsl-lang = { version = "=0.7.0", features = ["lexer-v2-full"] }
glsl-lang-pp = { version = "=0.7.0" }
lang-util = "=0.7.0"
argh = "0.1"

serde_json = { version = "1.0", optional = true }
Expand Down
8 changes: 4 additions & 4 deletions lang-lexer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang-lexer"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -13,8 +13,8 @@ keywords = ["glsl", "language", "parser"]
categories = ["parser-implementations", "rendering"]

[dependencies]
glsl-lang-types = "=0.6.1"
lang-util = { version = "=0.6.1", features = ["lalrpop"] }
glsl-lang-types = "=0.7.0"
lang-util = { version = "=0.7.0", features = ["lalrpop"] }

thiserror = "1.0"

Expand All @@ -24,7 +24,7 @@ rserde = { version = "1.0", optional = true, features = ["derive"], package = "s
logos = { version = "0.12", optional = true }

# v2 lexer dependencies
glsl-lang-pp = { version = "=0.6.1", optional = true }
glsl-lang-pp = { version = "=0.7.0", optional = true }
lalrpop-util = { version = "0.20.0", default-features = false, optional = true }

[features]
Expand Down
6 changes: 3 additions & 3 deletions lang-pp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang-pp"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -14,7 +14,7 @@ categories = ["parser-implementations", "rendering"]
build = "build.rs"

[dependencies]
lang-util = "=0.6.1"
lang-util = "=0.7.0"

string_cache = "0.8"
thiserror = "1.0"
Expand All @@ -32,7 +32,7 @@ itertools = { version = "0.13", optional = true }
once_cell = { version = "1.17.1", optional = true }

[dev-dependencies]
lang-util-dev = "=0.6.1"
lang-util-dev = "=0.7.0"

expect-test = "1.3"
encoding_rs = "0.8"
Expand Down
4 changes: 2 additions & 2 deletions lang-quote/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang-quote"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -17,7 +17,7 @@ proc-macro = true
path = "src/lib.rs"

[dependencies]
glsl-lang = { version = "=0.6.1", default-features = false, features = ["lexer-v2-full"] }
glsl-lang = { version = "=0.7.0", default-features = false, features = ["lexer-v2-full"] }

proc-macro2 = "1"
quote = "1"
Expand Down
5 changes: 5 additions & 0 deletions lang-quote/src/tokenize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,11 @@ fn tokenize_declaration(d: &ast::Declaration) -> TokenStream {
let ident = tokenize_identifier(ident);
quote! { glsl_lang::ast::DeclarationData::Invariant(#ident) }
}

ast::DeclarationData::TypeOnly(ref q) => {
let q = tokenize_type_qualifier(q);
quote! { glsl_lang::ast::DeclarationData::TypeOnly(#q) }
}
};

let span = tokenize_span(&d.span);
Expand Down
7 changes: 7 additions & 0 deletions lang-quote/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,10 @@ fn statement_var_decl() {
}
};
}

#[test]
fn typeonly_multiview_qualifier() {
let _ = glsl! {
layout (num_views = 2) in;
};
}
4 changes: 2 additions & 2 deletions lang-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang-types"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -13,7 +13,7 @@ keywords = ["glsl", "language", "parser"]
categories = ["rendering"]

[dependencies]
lang-util = "=0.6.1"
lang-util = "=0.7.0"
thiserror = "1.0"

rserde = { version = "1.0", optional = true, features = ["derive"], package = "serde" }
Expand Down
2 changes: 2 additions & 0 deletions lang-types/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ pub enum DeclarationData {
Block(Block),
/// Invariant declaration
Invariant(Identifier),
/// Type-only declaration
TypeOnly(TypeQualifier),
}

impl_node_content! {
Expand Down
2 changes: 1 addition & 1 deletion lang-util-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lang-util-derive"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand Down
2 changes: 1 addition & 1 deletion lang-util-dev/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lang-util-dev"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand Down
4 changes: 2 additions & 2 deletions lang-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lang-util"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -13,7 +13,7 @@ keywords = ["language", "parser", "ast"]
categories = ["parsing"]

[dependencies]
lang-util-derive = "=0.6.1"
lang-util-derive = "=0.7.0"
line-span = "0.1"
smol_str = "0.2"
text-size = "1.1"
Expand Down
14 changes: 7 additions & 7 deletions lang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang"
version = "0.6.1"
version = "0.7.0"
authors = ["Alixinne <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -17,19 +17,19 @@ lalrpop-util = { version = "0.20.0", default-features = false, features = ["std"
once_cell = "1.17.1"
thiserror = "1.0"

lang-util = { version = "=0.6.1", features = ["lalrpop"] }
glsl-lang-pp = { version = "=0.6.1", optional = true }
glsl-lang-lexer = { version = "=0.6.1", features = ["lalrpop"] }
glsl-lang-types = "=0.6.1"
lang-util = { version = "=0.7.0", features = ["lalrpop"] }
glsl-lang-pp = { version = "=0.7.0", optional = true }
glsl-lang-lexer = { version = "=0.7.0", features = ["lalrpop"] }
glsl-lang-types = "=0.7.0"

rserde = { version = "1.0", optional = true, features = ["derive"], package = "serde" }

[build-dependencies]
lalrpop = "0.20.0"

[dev-dependencies]
lang-util-dev = "=0.6.1"
glsl-lang-pp = "=0.6.1"
lang-util-dev = "=0.7.0"
glsl-lang-pp = "=0.7.0"

criterion = "0.5"
expect-test = "1.3"
Expand Down
1 change: 1 addition & 0 deletions lang/src/parser.lalrpop
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ declaration: ast::Declaration = {
<l:@L> <p:precision_declaration> ";" <r:@R> => p.spanned(l, r),
<l:@L> <b:block_declaration> ";" <r:@R> => ast::DeclarationData::Block(b).spanned(l, r),
<l:@L> "invariant" <i:identifier> ";" <r:@R> => ast::DeclarationData::Invariant(i).spanned(l, r),
<l:@L> <q:type_qualifier> ";" <r:@R> => ast::DeclarationData::TypeOnly(q).spanned(l, r),
};

function_definition: ast::FunctionDefinition = {
Expand Down
3 changes: 3 additions & 0 deletions lang/src/transpiler/glsl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,9 @@ where
f.write_char(' ')?;
show_identifier(f, ident, state)?;
}
ast::DeclarationData::TypeOnly(ref q) => {
show_type_qualifier(f, q, state)?;
}
}

state.write_declaration_terminator(f)
Expand Down
2 changes: 2 additions & 0 deletions lang/src/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,8 @@ macro_rules! make_host_trait {
ast::DeclarationData::Block(block) => block.$mthd_name(visitor),

ast::DeclarationData::Invariant(ident) => ident.$mthd_name(visitor),

ast::DeclarationData::TypeOnly(q) => q.$mthd_name(visitor),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion xtask/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xtask"
version = "0.6.1"
version = "0.7.0"
edition = "2021"

[dependencies]
Expand Down

0 comments on commit b918722

Please sign in to comment.