1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

LibCpp: Support for parsing c-style fixed arrays (arr[2])

Also adds tests for finding declaration of arrays inside
CppComprehension which requires proper parsing for passing.

Side-effect of this patch: if we ctrl+click on array variables, it
should jump to the correct declaration inside HackStudio.
This commit is contained in:
iyush 2023-04-15 16:40:40 +02:00 committed by Sam Atkins
parent 34b04271f4
commit ac435f914c
7 changed files with 184 additions and 8 deletions

View file

@ -0,0 +1,19 @@
TranslationUnit[0:0->2:0]
FunctionDeclaration[0:0->2:0]
NamedType[0:0->0:3]
void
foo
(
)
FunctionDefinition[0:11->2:0]
{
VariableDeclaration[1:4->1:20]
NamedType[1:4->1:6]
int
x
BracedInitList[1:15->1:20]
NumericLiteral[1:16->1:16]
1
NumericLiteral[1:18->1:18]
2
}