diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-02-22 17:20:11 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-23 15:30:37 +0000 |
commit | 2b1e468dabd2ac7bea7ec17740275f4f4aad30c3 (patch) | |
tree | 6cd847e75b45c9f02f2c3f299ca81664434c0f85 /src/sksl/SkSLIRGenerator.h | |
parent | 69d4992e69d7b142450d0ccb587b7b26be7cf1ea (diff) |
skslc switch support
BUG=skia:
Change-Id: Ida7f9e80139aa1e4f43804cafbcac640e47fab25
Reviewed-on: https://skia-review.googlesource.com/8771
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'src/sksl/SkSLIRGenerator.h')
-rw-r--r-- | src/sksl/SkSLIRGenerator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sksl/SkSLIRGenerator.h b/src/sksl/SkSLIRGenerator.h index 1336b68c88..fb79cda9b5 100644 --- a/src/sksl/SkSLIRGenerator.h +++ b/src/sksl/SkSLIRGenerator.h @@ -29,6 +29,7 @@ #include "ast/SkSLASTReturnStatement.h" #include "ast/SkSLASTStatement.h" #include "ast/SkSLASTSuffixExpression.h" +#include "ast/SkSLASTSwitchStatement.h" #include "ast/SkSLASTTernaryExpression.h" #include "ast/SkSLASTVarDeclaration.h" #include "ast/SkSLASTVarDeclarationStatement.h" @@ -140,6 +141,7 @@ private: std::unique_ptr<Statement> convertContinue(const ASTContinueStatement& c); std::unique_ptr<Statement> convertDiscard(const ASTDiscardStatement& d); std::unique_ptr<Statement> convertDo(const ASTDoStatement& d); + std::unique_ptr<Statement> convertSwitch(const ASTSwitchStatement& s); std::unique_ptr<Expression> convertBinaryExpression(const ASTBinaryExpression& expression); std::unique_ptr<Extension> convertExtension(const ASTExtension& e); std::unique_ptr<Statement> convertExpressionStatement(const ASTExpressionStatement& s); @@ -170,10 +172,12 @@ private: std::unordered_map<SkString, CapValue> fCapsMap; std::shared_ptr<SymbolTable> fSymbolTable; int fLoopLevel; + int fSwitchLevel; ErrorReporter& fErrors; friend class AutoSymbolTable; friend class AutoLoopLevel; + friend class AutoSwitchLevel; friend class Compiler; }; |