diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-06-26 14:09:53 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-06-26 14:14:06 -0700 |
| commit | 7d97d424c0a754ec49cccfc8af6c8983e0d06d80 (patch) | |
| tree | 3669bf42ed6e971cde176cb422beab6c53158e8c /source/slang/syntax.h | |
| parent | 0259ddb0a72d3b12278404847f6e30b63e97cfc3 (diff) | |
Fix parsing of string literals.
String literals can be used as part of attributes, but we lacked an actual AST representation for them.
This change adds basic parsing for string literals, as well as emit logic for them.
I also included a fix for parsing of chained right-associative operators.
To test these fixes, I've re-enabled one of the HLSL tests I disabled a while back. It would be good to go through and see how many of those we can re-enable now.
Diffstat (limited to 'source/slang/syntax.h')
| -rw-r--r-- | source/slang/syntax.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h index 5eb62462e..7a1701b88 100644 --- a/source/slang/syntax.h +++ b/source/slang/syntax.h @@ -1917,7 +1917,10 @@ namespace Slang public: enum class ConstantType { - Int, Bool, Float + Int, + Bool, + Float, + String, }; ConstantType ConstType; union @@ -1925,6 +1928,7 @@ namespace Slang int IntValue; FloatingPointLiteralValue FloatValue; }; + String stringValue; virtual RefPtr<SyntaxNode> Accept(SyntaxVisitor * visitor) override; }; |
