mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:17:45 +00:00
LibGLSL: Add tests for GLSL parser
This commit is contained in:
parent
29972876e4
commit
d160ff2f8d
24 changed files with 368 additions and 0 deletions
63
Userland/Libraries/LibGLSL/Tests/parser/expression.ast
Normal file
63
Userland/Libraries/LibGLSL/Tests/parser/expression.ast
Normal file
|
@ -0,0 +1,63 @@
|
|||
TranslationUnit[0:0->3:0]
|
||||
FunctionDeclaration[0:0->3:0]
|
||||
Type[0:0->0:3]
|
||||
void
|
||||
foo
|
||||
(
|
||||
)
|
||||
FunctionDefinition[1:0->3:0]
|
||||
{
|
||||
VariableDeclaration[2:4->2:66]
|
||||
Type[2:4->2:6]
|
||||
int
|
||||
a
|
||||
BinaryExpression[2:12->2:66]
|
||||
BinaryExpression[2:12->2:57]
|
||||
BinaryExpression[2:12->2:48]
|
||||
BinaryExpression[2:12->2:36]
|
||||
BinaryExpression[2:12->2:22]
|
||||
NumericLiteral[2:12->2:12]
|
||||
1
|
||||
+
|
||||
BinaryExpression[2:16->2:22]
|
||||
NumericLiteral[2:16->2:16]
|
||||
2
|
||||
*
|
||||
NumericLiteral[2:20->2:20]
|
||||
3
|
||||
+
|
||||
BinaryExpression[2:24->2:36]
|
||||
BinaryExpression[2:25->2:30]
|
||||
NumericLiteral[2:25->2:25]
|
||||
4
|
||||
-
|
||||
NumericLiteral[2:29->2:29]
|
||||
2
|
||||
/
|
||||
NumericLiteral[2:34->2:34]
|
||||
2
|
||||
+
|
||||
FunctionCall[2:38->2:48]
|
||||
Name[2:38->2:40]
|
||||
max
|
||||
(
|
||||
NumericLiteral[2:42->2:42]
|
||||
7
|
||||
NumericLiteral[2:45->2:45]
|
||||
8
|
||||
)
|
||||
-
|
||||
MemberExpression[2:50->2:57]
|
||||
Name[2:50->2:52]
|
||||
bar
|
||||
Name[2:54->2:55]
|
||||
xy
|
||||
+
|
||||
ArrayElementExpression[2:59->2:66]
|
||||
Name[2:59->2:61]
|
||||
abc
|
||||
[
|
||||
NumericLiteral[2:63->2:64]
|
||||
13
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue