1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 07:38:10 +00:00

LibCpp: Support non-field class members

Previously, we had a special ASTNode for class members,
"MemberDeclaration", which only represented fields.

This commit removes MemberDeclaration and instead uses regular
Declaration nodes for representing the members of a class.

This means that we can now also parse methods, inner-classes, and other
declarations that appear inside of a class.
This commit is contained in:
Itamar 2021-06-05 17:57:13 +03:00 committed by Andreas Kling
parent 8f074222e8
commit dcdb0c7035
6 changed files with 71 additions and 77 deletions

View file

@ -1,11 +1,11 @@
TranslationUnit[1:0->12:0]
StructOrClassDeclaration[1:0->7:0]
StructOrClassDeclaration[1:7->7:0]
MyStruct
MemberDeclaration[3:4->4:4]
VariableDeclaration[3:4->4:4]
Type[3:4->3:8]
int
x
MemberDeclaration[4:4->5:0]
VariableDeclaration[4:4->5:0]
Pointer[4:12->4:14]
Type[4:4->4:12]
s