From a083a37ee58dc48d92cf2b844466a295eb3e643e Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 10 Aug 2022 15:37:19 -0700 Subject: Add `none` literal that is convertible to `Optional`. (#2356) * Add `none` literal that is convertible to `Optional`. * Fix cpu code gen. * Include vk and cpu test for is-as operator test. * Inline comparison operators. Co-authored-by: Yong He --- source/slang/slang-ast-expr.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/slang/slang-ast-expr.h') diff --git a/source/slang/slang-ast-expr.h b/source/slang/slang-ast-expr.h index 2dfd937a4..6f10f2d82 100644 --- a/source/slang/slang-ast-expr.h +++ b/source/slang/slang-ast-expr.h @@ -101,6 +101,11 @@ class NullPtrLiteralExpr : public LiteralExpr SLANG_AST_CLASS(NullPtrLiteralExpr) }; +class NoneLiteralExpr : public LiteralExpr +{ + SLANG_AST_CLASS(NoneLiteralExpr) +}; + class StringLiteralExpr : public LiteralExpr { SLANG_AST_CLASS(StringLiteralExpr) -- cgit v1.2.3