mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:47:46 +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
26
Userland/Libraries/LibGLSL/Tests/parser/if-else.ast
Normal file
26
Userland/Libraries/LibGLSL/Tests/parser/if-else.ast
Normal file
|
@ -0,0 +1,26 @@
|
|||
TranslationUnit[0:0->6:0]
|
||||
FunctionDeclaration[0:0->6:0]
|
||||
Type[0:0->0:3]
|
||||
bool
|
||||
foo
|
||||
(
|
||||
)
|
||||
FunctionDefinition[1:0->6:0]
|
||||
{
|
||||
IfStatement[2:4->5:20]
|
||||
Predicate:
|
||||
BinaryExpression[2:8->2:14]
|
||||
NumericLiteral[2:8->2:8]
|
||||
1
|
||||
==
|
||||
NumericLiteral[2:13->2:13]
|
||||
2
|
||||
Then:
|
||||
ReturnStatement[3:8->3:19]
|
||||
BooleanLiteral[3:15->3:18]
|
||||
true
|
||||
Else:
|
||||
ReturnStatement[5:8->5:20]
|
||||
BooleanLiteral[5:15->5:19]
|
||||
false
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue