Repository navigation
Commit 08e222f
fix(DPC-64447): close a block comment at the first */ when nesting runs to end of input (#2965)
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 da7cf75 commit 08e222f
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 | |
|---|---|---|---|
| |||
6187 | 6187 | | |
6188 | 6188 | | |
6189 | 6189 | | |
6190 | | - | |
| 6190 | + | |
| 6191 | + | |
| 6192 | + | |
6191 | 6193 | | |
6192 | 6194 | | |
6193 | 6195 | | |
6194 | 6196 | | |
| 6197 | + | |
| 6198 | + | |
6195 | 6199 | | |
6196 | 6200 | | |
6197 | 6201 | | |
| 6202 | + | |
6198 | 6203 | | |
6199 | 6204 | | |
6200 | 6205 | | |
6201 | 6206 | | |
6202 | 6207 | | |
| 6208 | + | |
| 6209 | + | |
| 6210 | + | |
6203 | 6211 | | |
6204 | 6212 | | |
6205 | 6213 | | |
6206 | 6214 | | |
6207 | 6215 | | |
6208 | 6216 | | |
6209 | 6217 | | |
6210 | | - | |
6211 | | - | |
| 6218 | + | |
| 6219 | + | |
| 6220 | + | |
| 6221 | + | |
| 6222 | + | |
| 6223 | + | |
| 6224 | + | |
| 6225 | + | |
6212 | 6226 | | |
6213 | 6227 | | |
6214 | 6228 | | |
| |||
| 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