OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SKSL_PARSER | 8 #ifndef SKSL_PARSER |
9 #define SKSL_PARSER | 9 #define SKSL_PARSER |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 struct ASTDiscardStatement; | 28 struct ASTDiscardStatement; |
29 struct ASTDoStatement; | 29 struct ASTDoStatement; |
30 struct ASTExpression; | 30 struct ASTExpression; |
31 struct ASTExpressionStatement; | 31 struct ASTExpressionStatement; |
32 struct ASTForStatement; | 32 struct ASTForStatement; |
33 struct ASTIfStatement; | 33 struct ASTIfStatement; |
34 struct ASTInterfaceBlock; | 34 struct ASTInterfaceBlock; |
35 struct ASTLayout; | 35 struct ASTLayout; |
36 struct ASTModifiers; | 36 struct ASTModifiers; |
37 struct ASTParameter; | 37 struct ASTParameter; |
| 38 struct ASTPrecision; |
38 struct ASTReturnStatement; | 39 struct ASTReturnStatement; |
39 struct ASTStatement; | 40 struct ASTStatement; |
40 struct ASTSuffix; | 41 struct ASTSuffix; |
41 struct ASTType; | 42 struct ASTType; |
42 struct ASTWhileStatement; | 43 struct ASTWhileStatement; |
43 struct ASTVarDeclarations; | 44 struct ASTVarDeclarations; |
44 class SymbolTable; | 45 class SymbolTable; |
45 | 46 |
46 /** | 47 /** |
47 * Consumes .sksl text and produces an abstract syntax tree describing the conte
nts. | 48 * Consumes .sksl text and produces an abstract syntax tree describing the conte
nts. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 /** | 94 /** |
94 * Returns true if the 'name' identifier refers to a type name. For instance
, isType("int") will | 95 * Returns true if the 'name' identifier refers to a type name. For instance
, isType("int") will |
95 * always return true. | 96 * always return true. |
96 */ | 97 */ |
97 bool isType(std::string name); | 98 bool isType(std::string name); |
98 | 99 |
99 // these functions parse individual grammar rules from the current parse pos
ition; you probably | 100 // these functions parse individual grammar rules from the current parse pos
ition; you probably |
100 // don't need to call any of these outside of the parser. The function decla
rations in the .cpp | 101 // don't need to call any of these outside of the parser. The function decla
rations in the .cpp |
101 // file have comments describing the grammar rules. | 102 // file have comments describing the grammar rules. |
102 | 103 |
103 void precision(); | 104 std::unique_ptr<ASTDeclaration> precision(); |
104 | 105 |
105 std::unique_ptr<ASTDeclaration> directive(); | 106 std::unique_ptr<ASTDeclaration> directive(); |
106 | 107 |
107 std::unique_ptr<ASTDeclaration> declaration(); | 108 std::unique_ptr<ASTDeclaration> declaration(); |
108 | 109 |
109 std::unique_ptr<ASTVarDeclarations> varDeclarations(); | 110 std::unique_ptr<ASTVarDeclarations> varDeclarations(); |
110 | 111 |
111 std::unique_ptr<ASTType> structDeclaration(); | 112 std::unique_ptr<ASTType> structDeclaration(); |
112 | 113 |
113 std::unique_ptr<ASTVarDeclarations> structVarDeclaration(ASTModifiers modifi
ers); | 114 std::unique_ptr<ASTVarDeclarations> structVarDeclaration(ASTModifiers modifi
ers); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 void* fScanner; | 201 void* fScanner; |
201 YY_BUFFER_STATE fBuffer; | 202 YY_BUFFER_STATE fBuffer; |
202 Token fPushback; | 203 Token fPushback; |
203 SymbolTable& fTypes; | 204 SymbolTable& fTypes; |
204 ErrorReporter& fErrors; | 205 ErrorReporter& fErrors; |
205 }; | 206 }; |
206 | 207 |
207 } // namespace | 208 } // namespace |
208 | 209 |
209 #endif | 210 #endif |
OLD | NEW |