(ctx: StatementContext)
| 166 | } |
| 167 | |
| 168 | visitStatement(ctx: StatementContext): StatementNode { |
| 169 | // Non-control statements include a trailing semicolon at the statement level. |
| 170 | // Preserve legacy source-map behavior by assigning location from this wrapper rule. |
| 171 | const statement = this.visit(ctx.getChild(0)) as StatementNode; |
| 172 | |
| 173 | if (ctx.nonControlStatement()) { |
| 174 | statement.location = Location.fromCtx(ctx); |
| 175 | } |
| 176 | |
| 177 | return statement; |
| 178 | } |
| 179 | |
| 180 | visitNonControlStatement(ctx: NonControlStatementContext): StatementNode { |
| 181 | return this.visit(ctx.getChild(0)); |
no test coverage detected