Repository navigation
Commit 0f7e45a
fix(DPC-64447): close a block comment at the first */ when nesting runs to end of input
Block comment nesting (#1175) applies to every dialect, but most do not
nest: Snowflake, PostgreSQL and others end a comment at the first */.
SQL that commented out an expression already containing a commented-out
version therefore failed at end of input from IN_BLOCK_COMMENT.
consumeBlockCommentBody() now records where the first */ ended and, if
nesting runs past the end of the input, rewinds there and closes the
comment. Only input that currently throws takes the new path, so nesting
is unaffected and no feature flag is needed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 2ba80d3 commit 0f7e45a
2 files changed
Lines changed: 42 additions & 3 deletions
File tree
- src
- main/jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement/select
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6178 | 6178 | | |
6179 | 6179 | | |
6180 | 6180 | | |
6181 | | - | |
| 6181 | + | |
| 6182 | + | |
| 6183 | + | |
6182 | 6184 | | |
6183 | 6185 | | |
6184 | 6186 | | |
6185 | 6187 | | |
| 6188 | + | |
| 6189 | + | |
6186 | 6190 | | |
6187 | 6191 | | |
6188 | 6192 | | |
| 6193 | + | |
6189 | 6194 | | |
6190 | 6195 | | |
6191 | 6196 | | |
6192 | 6197 | | |
6193 | 6198 | | |
| 6199 | + | |
| 6200 | + | |
| 6201 | + | |
6194 | 6202 | | |
6195 | 6203 | | |
6196 | 6204 | | |
6197 | 6205 | | |
6198 | 6206 | | |
6199 | 6207 | | |
6200 | 6208 | | |
6201 | | - | |
6202 | | - | |
| 6209 | + | |
| 6210 | + | |
| 6211 | + | |
| 6212 | + | |
| 6213 | + | |
| 6214 | + | |
| 6215 | + | |
| 6216 | + | |
6203 | 6217 | | |
6204 | 6218 | | |
6205 | 6219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
105 | 130 | | |
0 commit comments