summaryrefslogtreecommitdiff
path: root/source/slang/expr-defs.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-10-30 19:31:52 -0400
committerGitHub <noreply@github.com>2017-10-30 19:31:52 -0400
commit832d9c708891b10145c6648d893b04ca4a0b879a (patch)
treee1f44fc27bf80d94de5ac0e866c7409b2adcec22 /source/slang/expr-defs.h
parentc24c173101c2c124401af77d8c513a23efac3b7e (diff)
parent3ffdf610d05a9318731bd7237da530c3d312a9a9 (diff)
Merge pull request #235 from tfoleyNV/explicit-this-expr
Support `this` expressions (explicit and implicit)
Diffstat (limited to 'source/slang/expr-defs.h')
-rw-r--r--source/slang/expr-defs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/expr-defs.h b/source/slang/expr-defs.h
index 81e8d9275..e3c16a674 100644
--- a/source/slang/expr-defs.h
+++ b/source/slang/expr-defs.h
@@ -148,3 +148,10 @@ END_SYNTAX_CLASS()
SYNTAX_CLASS(ParenExpr, Expr)
SYNTAX_FIELD(RefPtr<Expr>, base);
END_SYNTAX_CLASS()
+
+// An object-oriented `this` expression, used to
+// refer to the current instance of an enclosing type.
+SYNTAX_CLASS(ThisExpr, Expr)
+ FIELD(RefPtr<Scope>, scope);
+END_SYNTAX_CLASS()
+