mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 08:48:49 +00:00
For each .cpp file in the test suite data, there is a .ast file that represents the "known good" baseline of the parser result. Each .cpp file goes through the parser, and the result of invoking `ASTNode::dump()` on the root node is compared to the baseline to find regressions. We also check that there were no parser errors when parsing the .cpp files.
33 lines
651 B
Text
33 lines
651 B
Text
TranslationUnit[1:0->7:0]
|
|
FunctionDeclaration[1:0->7:0]
|
|
Type[1:0->1:4]
|
|
int
|
|
foo
|
|
(
|
|
)
|
|
FunctionDefinition[2:0->7:0]
|
|
{
|
|
VariableDeclaration[3:4->3:9]
|
|
Type[3:4->3:8]
|
|
int
|
|
x
|
|
VariableDeclaration[4:4->4:16]
|
|
Type[4:4->4:11]
|
|
double
|
|
y
|
|
NumericLiteral[4:15->4:15]
|
|
2
|
|
VariableDeclaration[5:4->5:20]
|
|
Type[5:4->5:11]
|
|
double
|
|
z
|
|
BinaryExpression[5:15->5:20]
|
|
Name[5:15->5:17]
|
|
x
|
|
+
|
|
Name[5:19->5:20]
|
|
y
|
|
ReturnStatement[6:4->6:12]
|
|
Name[6:11->6:12]
|
|
z
|
|
}
|