mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:07:44 +00:00
Libraries/LibCpp: Add parser test for out-of-line function definitions
This commit is contained in:
parent
cdfc530a99
commit
610b380515
2 changed files with 31 additions and 0 deletions
21
Userland/Libraries/LibCpp/Tests/parser/out-of-line.ast
Normal file
21
Userland/Libraries/LibCpp/Tests/parser/out-of-line.ast
Normal file
|
@ -0,0 +1,21 @@
|
|||
TranslationUnit[2:0->9:0]
|
||||
StructOrClassDeclaration[2:6->7:0]
|
||||
A
|
||||
FunctionDeclaration[4:4->4:14]
|
||||
NamedType[4:4->4:7]
|
||||
bool
|
||||
foo
|
||||
(
|
||||
)
|
||||
FunctionDeclaration[7:0->9:0]
|
||||
NamedType[7:0->7:3]
|
||||
bool
|
||||
A::foo
|
||||
(
|
||||
)
|
||||
FunctionDefinition[7:14->9:0]
|
||||
{
|
||||
ReturnStatement[8:4->8:15]
|
||||
BooleanLiteral[8:11->8:14]
|
||||
true
|
||||
}
|
10
Userland/Libraries/LibCpp/Tests/parser/out-of-line.cpp
Normal file
10
Userland/Libraries/LibCpp/Tests/parser/out-of-line.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
|
||||
class A
|
||||
{
|
||||
bool foo();
|
||||
};
|
||||
|
||||
bool A::foo() {
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue