From 4547125ce945140dc10542e9606b225dd06159b8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 5 Oct 2023 17:05:20 -0700 Subject: Add intellisense support for spirv_asm blocks. (#3264) Co-authored-by: Yong He --- source/slang/slang-parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/slang/slang-parser.cpp') diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index 517ab9e10..54b93a1ef 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -6468,7 +6468,6 @@ namespace Slang Diagnostics::spirvInstructionWithoutResultTypeId, ret.opcode.token ); - return std::nullopt; } // @@ -6519,9 +6518,10 @@ namespace Slang ret.operands.add(*operand); } else - return std::nullopt; + { + break; + } } - return ret; } @@ -6552,7 +6552,7 @@ namespace Slang } parser->ReadMatchingToken(TokenType::RBrace); - return failed ? nullptr : asmExpr; + return asmExpr; } static Expr* parsePrefixExpr(Parser* parser) -- cgit v1.2.3