diff --git a/Userland/Libraries/LibCpp/Tests/parser/out-of-line.ast b/Userland/Libraries/LibCpp/Tests/parser/out-of-line.ast new file mode 100644 index 0000000000..08119aad33 --- /dev/null +++ b/Userland/Libraries/LibCpp/Tests/parser/out-of-line.ast @@ -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 + } diff --git a/Userland/Libraries/LibCpp/Tests/parser/out-of-line.cpp b/Userland/Libraries/LibCpp/Tests/parser/out-of-line.cpp new file mode 100644 index 0000000000..8be70f1b12 --- /dev/null +++ b/Userland/Libraries/LibCpp/Tests/parser/out-of-line.cpp @@ -0,0 +1,10 @@ + + +class A +{ + bool foo(); +}; + +bool A::foo() { + return true; +}