diff options
Diffstat (limited to 'source/slang/slang-parser.cpp')
| -rw-r--r-- | source/slang/slang-parser.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index b89b93138..b208e1098 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -4733,6 +4733,14 @@ namespace Slang // We allow for an inheritance clause on a `struct` // so that it can conform to interfaces. parseOptionalInheritanceClause(this, rs); + if (AdvanceIf(this, TokenType::OpAssign)) + { + rs->wrappedType = ParseTypeExp(); + PushScope(rs); + PopScope(); + ReadToken(TokenType::Semicolon); + return rs; + } if (AdvanceIf(this, TokenType::Semicolon)) return rs; parseDeclBody(this, rs); |
