Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 6d90ec0

Browse files
committed
annotations: Annotate EmptyStatement node type
1 parent af0766b commit 6d90ec0

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

ANNOTATION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
| /self::\*\[@InternalType='CompilationUnit'\]//\*\[@InternalType='ArrayCreation'\] | Expression, Incomplete |
126126
| /self::\*\[@InternalType='CompilationUnit'\]//\*\[@InternalType='ThisExpression'\] | This, Expression |
127127
| /self::\*\[@InternalType='CompilationUnit'\]//\*\[@InternalType='Block'\] | BlockScope, Block, Statement |
128+
| /self::\*\[@InternalType='CompilationUnit'\]//\*\[@InternalType='EmptyStatement'\] | Statement |
128129
| /self::\*\[@InternalType='CompilationUnit'\]//\*\[@InternalType='ExpressionStatement'\] | Statement |
129130
| /self::\*\[@InternalType='CompilationUnit'\]//\*\[@InternalType='ReturnStatement'\] | Return, Statement |
130131
| /self::\*\[@InternalType='CompilationUnit'\]//\*\[@InternalType='BreakStatement'\] | Break, Statement |

driver/normalizer/annotation.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ var AnnotationRules = On(jdt.CompilationUnit).Roles(File).Descendants(
208208

209209
// Other statements
210210
On(jdt.Block).Roles(BlockScope, Block, Statement),
211+
On(jdt.EmptyStatement).Roles(Statement),
211212
On(jdt.ExpressionStatement).Roles(Statement),
212213
On(jdt.ReturnStatement).Roles(Return, Statement),
213214
On(jdt.BreakStatement).Roles(Break, Statement),

tests/empty_statement.uast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ CompilationUnit {
146146
. . . . . . . }
147147
. . . . . . . Children: {
148148
. . . . . . . . 0: EmptyStatement {
149-
. . . . . . . . . Roles: Unannotated
149+
. . . . . . . . . Roles: Statement
150150
. . . . . . . . . Properties: {
151151
. . . . . . . . . . internalRole: statements
152152
. . . . . . . . . }

tests/type_declaration_statement.uast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ CompilationUnit {
105105
. . . . . . . . . }
106106
. . . . . . . . }
107107
. . . . . . . . 1: EmptyStatement {
108-
. . . . . . . . . Roles: Unannotated
108+
. . . . . . . . . Roles: Statement
109109
. . . . . . . . . Properties: {
110110
. . . . . . . . . . internalRole: statements
111111
. . . . . . . . . }

0 commit comments

Comments
 (0)