[PATCH] D63835: [Syntax] Add nodes for most common statements
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 26 11:48:52 PDT 2019
ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added a project: clang.
ilya-biryukov added a parent revision: D61637: [Syntax] Introduce syntax trees.
Most of the statements mirror the ones provided by clang AST.
Major differences are:
- expressions are wrapped into 'ExpressionStatement' instead of being a subclass of statement,
- semicolons are always consumed by the leaf expressions (return, expression satement, etc),
- some clang statements are not handled yet, we wrap those into an UnknownStatement class, which is not present in clang.
We also define an 'Expression' and 'UnknownExpression' classes in order
to produce 'ExpressionStatement' where needed. The actual implementation
of expressions is not yet ready, it will follow later.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D63835
Files:
clang/include/clang/Tooling/Syntax/Nodes.h
clang/lib/Tooling/Syntax/BuildTree.cpp
clang/lib/Tooling/Syntax/Nodes.cpp
clang/unittests/Tooling/Syntax/TreeTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63835.206721.patch
Type: text/x-patch
Size: 27899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190626/4cb77dca/attachment-0001.bin>
More information about the cfe-commits
mailing list