summaryrefslogtreecommitdiffstats
path: root/source/slang/syntax.h
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-06-16 09:09:09 -0700
committerTim Foley <tfoley@nvidia.com>2017-06-16 09:09:09 -0700
commit9ba8ce30f8314a79169e6d9cfa12e5db7239693f (patch)
tree587db9fd5b9920f39104ea6467de59d265188370 /source/slang/syntax.h
parent0bf3d6d4db7409fcd288ff69e75e8e8b4f082969 (diff)
Bug fix: handle unchecked operator application in emit logic
When in rewriter mode, the emit logic will never see function applications inside function bodies, but it *will* see function application expressions at global scope, and some of these expressions might be unchecked. The challenge here is that even simple math operations now show up as function calls, so we need a bit of special-case logic to detect unchecked calls and then emit them using the syntax they were written with (e.g., use infix syntax if they were written as an infix expression).
Diffstat (limited to 'source/slang/syntax.h')
-rw-r--r--source/slang/syntax.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h
index 9f93c305c..56574d124 100644
--- a/source/slang/syntax.h
+++ b/source/slang/syntax.h
@@ -1784,14 +1784,14 @@ namespace Slang
// The declaration of the symbol being referenced
DeclRef<Decl> declRef;
+
+ // The name of the symbol being referenced
+ String name;
};
class VarExpressionSyntaxNode : public DeclRefExpr
{
public:
- // The name of the symbol being referenced
- String Variable;
-
virtual RefPtr<SyntaxNode> Accept(SyntaxVisitor * visitor) override;
};
@@ -1984,7 +1984,6 @@ namespace Slang
{
public:
RefPtr<ExpressionSyntaxNode> BaseExpression;
- String MemberName;
virtual RefPtr<SyntaxNode> Accept(SyntaxVisitor * visitor) override;
};