- 6.0.1
- 6.0
- 5.0.2
- 5.0.1
- 5.0.0
- 4.1.1
- 4.1
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0
- 3.0
- 2.0.1
- 2.0
- 1.2
- 1.1.1
- 1.1
- 1.0.2
- 1.0.1
- 1.0
- 0.13.5
- 0.13.4
- 0.13.3
- 0.13.2
- 0.13.1
- 0.13
- 0.12
- 0.11
- 0.10.1
- 0.10
- 0.9.2
- 0.9.1
- 0.9
- 0.8.1
- 0.8
- 0.7.2
- 0.7.1
- 0.7
- 0.6.5
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6
- 0.5
- 0.4.2
- 0.4.1
- 0.4
- 0.3.1
- 0.3
- 0.2.2
- 0.2.1
- 0.2
- 0.1
Jul 11, 2021
- Better scheme for parenthesis generation in the GLSL transpiler.
- Fix matrices types in the GLSL transpiler.
- Fix end-of-line parser, which now accepts CR LF too.
Dec 7th, 2020
- Change the meaning of
Visitor
andHost
. They now take the AST nodes by simple references (&
) and not via mutable references (&mut
) anymore. This will allow people to use visitors in much more contexts. - Add
VisitorMut
andHostMut
to visit AST nodes mutably. These correspond to the previous (version<6.0
)Visitor
andHost
traits. If you were using them and require mutability, feel free to simply switch toVisitorMut
andHostMut
.
Nov 1st, 2020
- Bump
nom-6.0
.
Aug 12th, 2020
- Fix float / double literal parsing priority. Floats are parsed first now in case of a polymorphic constant.
Jul 27th, 2020
- Fix array specifiers by splitting the
ArraySpecifier
type into two types:ArraySpecifier
, which holds a non-empty list ofArraySpecifierDimension
.ArraySpecifierDimension
, which is the “old”ArraySpecifier
. This change allows for multidimensional array specifiers.
- If you were using array specifiers, you need to wrap them inside an
ArraySpecifierDimension
and wrap it in aArraySpecifier { dimensions: NonEmpty(vec![here]) }
expression, wherehere
is your specifier.
Wed Jul 1st 2020
- Fix the identifier parser, that previously failed to parse identifiers starting with an
underscore (
_
) while it is permitted (chapter 3.7 of the GLSLang spec). - Fix associativity for logical binary operators (
||
,&&
).
Fri Jun 19th 2020
- Implement
std::error::Error
for error types.
Fri Mar 6th 2020
- Move all the unit tests code into their ow module to prevent rustc from parsing them if we don’t build with tests.
Mon 10th Feb 2020
- Remove the
lexical
feature fromnom
. It’s useful only when using functions such as thefloat
combinator, which we don’t use.
Tue 21st Jan 2020
- Fix a bug occurring in the function-like
#define
parser (i.e.#define foo(x) (y)
) that would prevent the use of whitespaces in the argument list.
Mon 6th Jan 2020
- Add support for
attribute
andvarying
keyword as a backward-compatible parser. - Fix binary operator associativity. They were (erroneously) right-associative. They’re now parsed as left-associative.
Wed 14th Nov 2019
JumpStatement::Return
now takes an optionalExpr
instead of anExpr
directly. That allows for parsing statements such asreturn;
, which should have been supported from the beginning.- Support for missing preprocessor directives:
#if
.#ifdef
.#ifndef
.#elseif
.#else
.#endif
.#error
.#include
.#line
.#pragma
.#undef
.
- Add a
rustfmt.toml
to reformat everything and stay consistent. If you want contribute, ensure you are correctly usingrustfmt
(either by runningcargo fmt
before submitting a PR or by configuring your editor to format the code for you). This is important, as not respecting the formatting would make your contribution impossible to merge due to a CI check. - Support for multiline annotations (
\
). Multiline annotations are currently supported as part of spaces — i.e. you cannot use them to break an identifier on two lines for instance. This choice makes it faster to parse without too much compromises (after all,\
is mostly used in CPP directives in GLSL). - Fix a bug with recoverable parsers that would produce parent parsers to ignore GLSL grammar errors. That fix also implies a boost in performance due to short-circuiting optimizations.
Fri 8th Nov 2019
- Improve performance of expression parsers.
Thu 24th Oct 2019
- Add
ShaderKind::Compute
. - Remove
NonEmpty::from_iter
andTranslationUnit::from_iter
as they were deprecated. Use*::from_non_empty_iter
instead.
- Fix tokenizer of
Block
. - Fix a bug while parsing floating-point numbers.
- Reformat with
rustfmt
.
Wed 18th Sep 2019
NonEmpty::from_iter
andTranslationUnit::from_iter
are deprecated in favor of*::from_non_empty_iter
.
- Add binary SPIR-V transpilation. That enables to transpile GLSL directly into a SPIR-V buffer.
- Add
NonEmpty::from_non_empty_iter
andTranslationUnit::from_non_empty_iter
.
Tue 17th Sep 2019
- Update internal code for Rust edition 2018.
Tue 30th of July 2019
- Add the
ShaderStage
type alias toTranslationUnit
. - Enhance the front documentation to showcase how to use how to use the crate.
Tue 23rd of July 2019
- Change the description of the project and update documentation.
Tue 23rd of July 2019
- Change the
external_declaration
parser so that it can also accept GLSL460. That should be a breaking change because now, GLSL450 formatted input accepts feature from GLSL460, which shouldn’t be allowed. Nevertheless, the added feature (being able to use semicolons (;
) on empty lines at top-level) is not really an interesting property and no breakage should happen.
Thu 18th of July 2019
- Migrate all parsers to nom-5.
- Improve and add unit and integration tests.
- Improve overall documentation.
- Enhance some allocation scheme (removed them by using more adapted parsers).
- Completely remove the byte (
&[u8]
) parsing. That was a bad idea, for both its impractical aspect and error removing. Parsing is done on string slices now (&str
).
Sun 9th of December 2018
- Add the SPIR-V transpiler. Currently, it’s feature-gated and very experimental. Feel free to try and provide feedback about it.
- Add simple accessors for
ParseResult
. - Fix a typo in the documentation of syntax.
- Add some unit and integration tests.
- Add
Identifier::as_str
andTypeName::as_str
Wed 25nd of November 2018
- Add
NonEmpty::push
andNonEmpty::pop
. - Implement
Deref
andDerefMut
forTranslationUnit
.
Wed 24nd of November 2018
- Add
NonEmpty::from_iter
andTranslationUnit::from_iter
. - Implement
IntoIterator
forNonEmpty
andTranslationUnit
.
Wed 22nd of November 2018
- Fix a typo in documentation.
Wed 22nd of November 2018
- Fix a link in documentation.
Wed 21st of November 2018
- Update/reset hyperlinks in all the documentation for types, traits, methods, etc.
- General enhancement of the documentation.
ExternalDeclaration::new_struct
can now fail. Check the doc for further details.NonEmpty
,Identifier
andTypeName
andTranslationUnit
are now plain types and not aliases anymore.- Add AST visitors. Visitors allow for traversing through an AST and on-the-fly mutation, filtering, etc.
- The
#define
preprocessor pragma is now supported in a limited form (it can only be used in the global scope).
Sun 11th of November 2018
- Fix the type of identifier stored in
Block
: it now uses the new encoding for arrayed identifiers. Block
parsers update for the arrayd identifier change.
Sat 10th of November 2018
- Add helper functions to build objects form the
syntax
module. Those are intended to be a simple way to build ASTs out of Rust code instead of parsing. - Enhance the documentation of the
Preprocessor
type.
Fri 2nd of November 2018
- Add some missing implementors of
Parse
for types fromglsl::syntax
.
Fri 2nd of November 2018
- Hide the
parsers
module. It’s not exposed anymore as it was mostly nom parsers and we don’t like leaking internals. - Introduce the
Parser
trait, acting as an abstraction over the internal parsers. Implementors provide a type-driven parsing experience that is very similar to the one as FromStr. This change is actually mandatory for the glsl-quasiquote crate’sglsl!
proc-macro to allow people use it for any GLSL item (and not onlyTranslationUnit
). - Enhance the overall documentation.
Wed 3rd of October 2018
- Fix GLSL transpiled representation of
IVec*
. It was plain wrong.
Sat 7th of July 2018
- Fix unit testing in transpilers.
Sat 7th of July 2018
- Big cleanup of the module hierarchy.
- Enhanced the documentation.
Sun, 17th of June 2018
- Add the
README.md
path to theCargo.toml
manifest.
Sun 17th of June 2018
This version introduces breaking changes because public types used in return positions have changed.
These concern only intermediate nom
functions, so if you do not make a fancy use of this crate,
you souldn’t have to worry too much when migrating.
- Fix the roundtrip issue with the GLSL writer (precedence wasn’t correctly respected).
- Simplify internal code.
- Error instead of panicking when parsing overflowing integer literals.
- Fix panic trying to parse literals starting with whitespace.
- Add fuzzing to find out panics.
Wed 13th of December 2017
- Fix the
show_expr
when theExpr
is aExpr::UIntConst
.
Mon 20th of November 2017
std::error::Error
is now implemented forParseError
.
Wed 27th of September 2017
- Add support for postfix expressions as function identifiers.
Mon 4th of September 2017
- Fix the formatting of floating values when the fractional part is
0
.
Mon 4th of September 2017
- Fix the output for
show_struct_specifier
.
Mon 4th of September 2017
- Fix the output for
show_struct_specifier
.
Mon 4th of September 2017
- Remove a warning.
Mon 4th of September 2017
- Fix
show_struct_specifier
.
Fri 1st of September 2017
- The
TypeSpecifier
type was wrong as it didn’t carry anyArraySpecifier
information while the GLSL specification’s grammar about type specifiers states they should. Fixed.
Mon 7th of August 2017
- The
parse
andparse_str
functions now take as second argument the parser to run. This enables using those functions and all the neat logic the wrap in dependent projects.
Fri 4th of August 2017
- A GLSL writer is now available.
- Some parsers yield non-empty list of syntax trees. Those had the incorrect
Vec
type. They were replaced byNonEmpty
, which is an alias toVec
, but carry the semantic that it has at least one element in it.
Thu 3rd of August 2017
- Uni/multi-line comments are now supported.
Wed 2nd of August 2017
- The
Declaration::Block
variant was refactored for a better usage. - Dot field selections and, in a mory general way, postfix expressions completely fixed. The
syntax
module was altered to make it easier to work with dot field selection. Also related, the function identifier syntax is now isomorphic to an identifier.
Tue 1st of August 2017
- Fix the
preprocessor
parser so that it eats surrounding blanks.
Mon 31st of July 2017
- Add a very minimalistic yet working preprocessor. It parses
#version
and#extension
commands. Those have to be declared at the top of your file, even though this implementation accepts them at any place an external declaration could be defined. Feel free to submit a PR if you want to change that behavior, I don’t really mind. - Enhance the runtime error reporting. It’s not perfect, but it’s way better than before!
void
is now recognized asTypeSpecifier::Void
instead of the erroneousTypeSpecifier::TypeName("void")
.
Mon 31st of July 2017
- The
layout
parser had a nasty bug that would treat a list of key-value pairs as an expression assignment. This was fixed and it now treats it as a list of pairs of identifier associated with a possible constant expression. - The
StructFieldSpecifier
type and its associated parser were wrong. Was missing:- the type qualifier
- for each identifier defined in the field specifier, its optional array specifier, as in
float foo[3];
orvec3 bar[];
for unsized ones.
Sun 30th of July 2017
- More documentation to help people to get their feet wet.
Sat 29th of July 2017
- The whole parsing API is public.
- Initial revision.