mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:47:34 +00:00
LibCpp: Parse inheritance
This commit is contained in:
parent
8cfabbcd93
commit
f4cca20972
8 changed files with 43 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
TranslationUnit[0:0->10:1]
|
||||
StructOrClassDeclaration[0:6->10:1]
|
||||
A
|
||||
|
||||
C'tor
|
||||
(
|
||||
Parameter[1:6->1:10]
|
||||
|
|
14
Userland/Libraries/LibCpp/Tests/parser/inheritance.ast
Normal file
14
Userland/Libraries/LibCpp/Tests/parser/inheritance.ast
Normal file
|
@ -0,0 +1,14 @@
|
|||
TranslationUnit[0:0->3:1]
|
||||
StructOrClassDeclaration[0:6->3:1]
|
||||
A
|
||||
:
|
||||
Name[0:17->0:32]
|
||||
SomeNamespace::B
|
||||
,
|
||||
Name[0:43->0:43]
|
||||
C
|
||||
|
||||
VariableDeclaration[2:4->3:0]
|
||||
NamedType[2:4->2:6]
|
||||
int
|
||||
x
|
4
Userland/Libraries/LibCpp/Tests/parser/inheritance.cpp
Normal file
4
Userland/Libraries/LibCpp/Tests/parser/inheritance.cpp
Normal file
|
@ -0,0 +1,4 @@
|
|||
class A : public SomeNamespace::B, private C
|
||||
{
|
||||
int x;
|
||||
};
|
|
@ -1,6 +1,7 @@
|
|||
TranslationUnit[2:0->9:0]
|
||||
StructOrClassDeclaration[2:6->7:0]
|
||||
A
|
||||
|
||||
FunctionDeclaration[4:4->4:14]
|
||||
NamedType[4:4->4:7]
|
||||
bool
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
TranslationUnit[1:0->12:0]
|
||||
StructOrClassDeclaration[1:7->7:0]
|
||||
MyStruct
|
||||
|
||||
VariableDeclaration[3:4->4:4]
|
||||
NamedType[3:4->3:6]
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue