C++: Add support for StmtExpr to Print AST.

This commit is contained in:
Cornelius Riemenschneider
2020-10-30 15:53:04 +01:00
parent d3631d8f2e
commit 84fe7ba199
5 changed files with 73 additions and 3 deletions

View File

@@ -724,6 +724,19 @@ StatementExpr.c:
# 2| getExpr(): [StmtExpr] (statement expression)
# 2| Type = [IntType] int
# 2| ValueCategory = prvalue
# 2| getStmt(): [BlockStmt] { ... }
# 2| getStmt(0): [DeclStmt] declaration
# 2| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i
# 2| Type = [IntType] int
# 2| getVariable().getInitializer(): [Initializer] initializer for i
# 2| getExpr(): [Literal] 5
# 2| Type = [IntType] int
# 2| Value = [Literal] 5
# 2| ValueCategory = prvalue
# 2| getStmt(1): [ExprStmt] ExprStmt
# 2| getExpr(): [VariableAccess] i
# 2| Type = [IntType] int
# 2| ValueCategory = prvalue(load)
# 3| getStmt(1): [ReturnStmt] return ...
StaticMemberAccess.cpp:
# 1| [CopyAssignmentOperator] X& X::operator=(X const&)