Skip to content

v2.0.0-pre10 - Root Refactoring with new External Declaration Index and RootSupplier, Added ParseShape, Fixed Parsing Bug

Pre-release
Pre-release
Compare
Choose a tag to compare
@douira douira released this 21 Feb 02:13
· 32 commits to main since this release
8f5d941
  • Removed the pattern of passing a member of the AST to provide a reference to a root instance
  • Added ParseShape that neatly contains all the method references that are necessary to tell the GLSL parser, AST builder and cache how to handle a string or some intermediary stage
  • Added RootSupplier that is a kind of root factory that can be set on the AST transformer and is used to generate Root instances easier than having the instantiation hidden in private methods
  • Removed cloneSeparate method from all the AST nodes and removed many unnecessary methods from Root
  • Refactor ASTBuilder and ASTParser to match the RootSupplier changes
  • Made node index and identifier indexes nullable to support using roots that have fewer indexes if they aren't required as this improves overall performance
  • Renamed members of ExternalDeclarationType to be consistent with their class and parse rule names
  • Added ExternalDeclarationIndex (EDI) and PrefixExternalDeclarationIndex
  • Added a field for EDIs to Root and support for tracking external declarations as they are renamed and registered/unregistered
  • Added many tests for EDIs and prefix EDIs
  • Added a test to ensure DeclarationMembers are parsed correctly as they were not previously
  • Fixed a parser grammar bug where declaration members were not parsed correctly, now sequence expressions are correctly disallowed as initializers
  • Added documentation about prefixMap and prefixQuery: Using them with indexes that support suffixes and infixes will lead to wrong results unless the user knows the structure of the internal index used by the permuterm indexer
  • Refactor test resource manager into separate files for easer re-use in glsl-preprocessor and general cleanup
  • Updated slf4j dependency to 2.0.0 and jabel to 1.0.0

Meta:

  • Added more thoughts on sidecar injection and initializer movement transformation prototypes
  • Upgraded to Gradle 8 and fixed the GH Actions script to use Java 16 so that it doesn't break
  • Updated the readme with information about glsl-preprocessor and preprocessing in general

Full Changelog: v2.0.0-pre9...v2.0.0-pre10