Skip to content

0.6.0

Choose a tag to compare

@pema99 pema99 released this 01 May 01:04
· 32 commits to master since this release

This release contains breaking changes

Full changeset: 0.5.4...0.6.0

Changes:

  • Feature: Added ShaderLabPrinter, which can be used to pretty-print ShaderLab syntax trees. There is also a new helper function ShaderLabSyntaxNode.GetPrettyPrintedCode that invokes it.
  • Feature: Added support for the stringizing (#) operator in the embedded HLSL preprocessor.
  • Breaking: Allowed for disambiguating CG, HLSL and GLSL program blocks. TokenKind.ProgramBlock and TokenKind.IncludeBlock have been removed in favor of specialized variants like TokenKind.HlslProgramBlock. HLSLProgramBlock and HLSLIncludeBlock have a new field Kind which describes which kind of code the block represents.
  • Breaking: Marked ShaderPassNode, ShaderLabCommandNode and ShaderLabBasicToggleCommandNode as abstract, and remove their associated methods from ShaderLabSyntaxVisitor. These AST nodes don't provide additional info, and having them as concrete classes was confusing.
  • Add some more helper functions to ShaderLabSyntaxFacts.
  • Fixed a bug where ShaderLabParser would occasionally get stuck in an infinite loop.
  • Added newlines between function attributes when using HLSLPrinter.
  • Added a type-erased version of PrintingUtil.GetEnumName, called PrintingUtil.GetEnumNameTypeErased.