[PATCH] D85316: [SyntaxTree] Proposition of new tree dump
Eduardo Caldas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 00:37:03 PDT 2020
eduucaldas updated this revision to Diff 283513.
eduucaldas added a comment.
Reflect comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85316/new/
https://reviews.llvm.org/D85316
Files:
clang/unittests/Tooling/Syntax/TreeTest.cpp
Index: clang/unittests/Tooling/Syntax/TreeTest.cpp
===================================================================
--- clang/unittests/Tooling/Syntax/TreeTest.cpp
+++ clang/unittests/Tooling/Syntax/TreeTest.cpp
@@ -3348,34 +3348,34 @@
HALF_IF HALF_IF_2 else {}
})cpp",
R"txt(
-*: TranslationUnit
+TranslationUnit Detached
`-SimpleDeclaration
- |-void
- |-SimpleDeclarator
- | |-test
+ |-'void'
+ |-SimpleDeclarator SimpleDeclaration_declarator
+ | |-'test'
| `-ParametersAndQualifiers
- | |-(
- | `-)
+ | |-'(' OpenParen
+ | `-')' CloseParen
`-CompoundStatement
- |-{
- |-IfStatement
- | |-I: if
- | |-I: (
- | |-I: BinaryOperatorExpression
- | | |-I: IntegerLiteralExpression
- | | | `-I: 1
- | | |-I: +
- | | `-I: IntegerLiteralExpression
- | | `-I: 1
- | |-I: )
- | |-I: CompoundStatement
- | | |-I: {
- | | `-I: }
- | |-else
- | `-CompoundStatement
- | |-{
- | `-}
- `-}
+ |-'{' OpenParen
+ |-IfStatement CompoundStatement_statement
+ | |-'if' IntroducerKeyword I
+ | |-'(' I
+ | |-BinaryOperatorExpression I
+ | | |-IntegerLiteralExpression BinaryOperatorExpression_leftHandSide I
+ | | | `-'1' LiteralToken I
+ | | |-'+' OperatorExpression_operatorToken I
+ | | `-IntegerLiteralExpression BinaryOperatorExpression_rightHandSide I
+ | | `-'1' LiteralToken I
+ | |-')' I
+ | |-CompoundStatement IfStatement_thenStatement I
+ | | |-'{' OpenParen I
+ | | `-'}' CloseParen I
+ | |-'else' IfStatement_elseKeyword
+ | `-CompoundStatement IfStatement_elseStatement
+ | |-'{' OpenParen
+ | `-'}' CloseParen
+ `-'}' CloseParen
)txt"));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85316.283513.patch
Type: text/x-patch
Size: 1704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200806/e4e2f232/attachment.bin>
More information about the cfe-commits
mailing list