diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-02-27 10:08:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-27 10:08:29 -0500 |
| commit | 13ad9c83e7617bf8afef1509e4becde19dd1f59d (patch) | |
| tree | be8056c265ab5bf7d98a097672b83e3d5a33e028 /source | |
| parent | 15ed4527a28e757ae2617905188ebf19f16cb0a1 (diff) | |
* Remove typo in TryRecover (#863)
* Remove GLSL specific check - as no longer support GLSL
* Remove erroneous check for { on parseClass
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/parser.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source/slang/parser.cpp b/source/slang/parser.cpp index 3abc47ede..72e682a63 100644 --- a/source/slang/parser.cpp +++ b/source/slang/parser.cpp @@ -388,7 +388,7 @@ namespace Slang } for (int ii = 0; ii < recoverAfterCount; ++ii) { - switch (recoverBefore[ii]) + switch (recoverAfter[ii]) { default: break; @@ -454,8 +454,9 @@ namespace Slang // We are looking for end-of-file, so it is okay to skip here } else - - return false; + { + return false; + } } // Skip balanced tokens and try again. @@ -1856,12 +1857,6 @@ namespace Slang } } - // GLSL allows `[]` directly in a type specifier - if (parser->getSourceLanguage() == SourceLanguage::GLSL) - { - typeExpr = parsePostfixTypeSuffix(parser, typeExpr); - } - typeSpec.expr = typeExpr; return typeSpec; } @@ -3023,8 +3018,9 @@ namespace Slang FillPosition(rs.Ptr()); ReadToken("class"); rs->nameAndLoc = expectIdentifier(this); - ReadToken(TokenType::LBrace); + parseOptionalInheritanceClause(this, rs.Ptr()); + parseAggTypeDeclBody(this, rs.Ptr()); return rs; } |
