aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLParser.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-06-27 11:20:22 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-27 18:27:57 +0000
commitc070939fd1a954b7a492bc30f0cf64a664b90181 (patch)
tree6b1167726bc9ac4d2073f893c699b40c70f63ba1 /src/sksl/SkSLParser.h
parent26249e0e1d1b18a1e67195a2998b49958426f8ba (diff)
Re-land sksl fragment processor support
This reverts commit ed50200682e0de72c3abecaa4d5324ebcd1ed9f9. Bug: skia: Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab Reviewed-on: https://skia-review.googlesource.com/20965 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLParser.h')
-rw-r--r--src/sksl/SkSLParser.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/sksl/SkSLParser.h b/src/sksl/SkSLParser.h
index 2f55b34986..e820484591 100644
--- a/src/sksl/SkSLParser.h
+++ b/src/sksl/SkSLParser.h
@@ -13,6 +13,7 @@
#include <unordered_map>
#include <unordered_set>
#include "SkSLErrorReporter.h"
+#include "ir/SkSLLayout.h"
#include "SkSLToken.h"
struct yy_buffer_state;
@@ -42,7 +43,6 @@ struct ASTSwitchStatement;
struct ASTType;
struct ASTWhileStatement;
struct ASTVarDeclarations;
-struct Layout;
struct Modifiers;
class SymbolTable;
@@ -64,7 +64,12 @@ public:
private:
/**
- * Return the next token from the parse stream.
+ * Return the next token, including whitespace tokens, from the parse stream.
+ */
+ Token nextRawToken();
+
+ /**
+ * Return the next non-whitespace token from the parse stream.
*/
Token nextToken();
@@ -76,7 +81,7 @@ private:
void pushback(Token t);
/**
- * Returns the next token without consuming it from the stream.
+ * Returns the next non-whitespace token without consuming it from the stream.
*/
Token peek();
@@ -87,8 +92,8 @@ private:
bool checkNext(Token::Kind kind, Token* result = nullptr);
/**
- * Reads the next token and generates an error if it is not the expected type. The 'expected'
- * string is part of the error message, which reads:
+ * Reads the next non-whitespace token and generates an error if it is not the expected type.
+ * The 'expected' string is part of the error message, which reads:
*
* "expected <expected>, but found '<actual text>'"
*
@@ -115,6 +120,8 @@ private:
std::unique_ptr<ASTDeclaration> directive();
+ std::unique_ptr<ASTDeclaration> section();
+
std::unique_ptr<ASTDeclaration> declaration();
std::unique_ptr<ASTVarDeclarations> varDeclarations();
@@ -131,6 +138,10 @@ private:
int layoutInt();
+ String layoutCode();
+
+ Layout::Key layoutKey();
+
Layout layout();
Modifiers modifiers();