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.
We don't format these files, as they might have been intentionally
formatted differently from the normal serenity style for testing.
So ignore them from our global style, so clang-format
doesn't pick them up by accident.
Similarly to the LibCpp parser regression tests, these tests run the
preprocessor on the .cpp test files under
Userland/LibCpp/Tests/preprocessor, and compare the output with existing
.txt ground truth files.
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.
For each .cpp file in the test suite data, there is a .ast file that
represents the "known good" baseline of the parser result.
Each .cpp file goes through the parser, and the result of
invoking `ASTNode::dump()` on the root node is compared to the
baseline to find regressions.
We also check that there were no parser errors when parsing the .cpp
files.