0.6.0
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 functionShaderLabSyntaxNode.GetPrettyPrintedCodethat 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.ProgramBlockandTokenKind.IncludeBlockhave been removed in favor of specialized variants likeTokenKind.HlslProgramBlock.HLSLProgramBlockandHLSLIncludeBlockhave a new fieldKindwhich describes which kind of code the block represents. - Breaking: Marked
ShaderPassNode,ShaderLabCommandNodeandShaderLabBasicToggleCommandNodeasabstract, and remove their associated methods fromShaderLabSyntaxVisitor. 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, calledPrintingUtil.GetEnumNameTypeErased.