Repository navigation
Commit fea51ec
committed
fix: keep a dot in front of a number in an unsupported statement
captureRest() collapsed a dot into the token in front of it whenever the
previous token ended with a dot or the current token was a dot, without
looking at what followed. A dot which starts a number was therefore glued
to its neighbour, and the captured token stream no longer read back the
same way once it was rendered and parsed again:
REPLACE( . 5 captured as REPLACE ( .5
REPLACE( INTO t VALUES (1, . 5) REPLACE ( INTO t VALUES ( 1 ,.5 )
REPLACE( x . 1 . 2 captured as REPLACE ( x.1.2
toString() of such a statement is not a fixpoint, and the token stream it
prints is not what the input contained.
The dot is now only used to collapse a qualified name when it is a
qualifier. A dot which is followed by a number, and a number in front of
a dot, keep the tokens apart. A qualified name still collapses:
REPLACE( t . a . b captured as REPLACE ( t.a.b
REPLACE( a . b captured as REPLACE ( a.b1 parent 7123d25 commit fea51ec
2 files changed
Lines changed: 99 additions & 1 deletion
File tree
- src
- main/jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25128 | 25128 | | |
25129 | 25129 | | |
25130 | 25130 | | |
25131 | | - | |
| 25131 | + | |
| 25132 | + | |
25132 | 25133 | | |
25133 | 25134 | | |
25134 | 25135 | | |
| |||
25138 | 25139 | | |
25139 | 25140 | | |
25140 | 25141 | | |
| 25142 | + | |
| 25143 | + | |
| 25144 | + | |
| 25145 | + | |
| 25146 | + | |
| 25147 | + | |
| 25148 | + | |
| 25149 | + | |
| 25150 | + | |
| 25151 | + | |
| 25152 | + | |
| 25153 | + | |
| 25154 | + | |
| 25155 | + | |
| 25156 | + | |
| 25157 | + | |
| 25158 | + | |
| 25159 | + | |
| 25160 | + | |
| 25161 | + | |
| 25162 | + | |
| 25163 | + | |
| 25164 | + | |
| 25165 | + | |
| 25166 | + | |
| 25167 | + | |
| 25168 | + | |
| 25169 | + | |
| 25170 | + | |
| 25171 | + | |
| 25172 | + | |
| 25173 | + | |
| 25174 | + | |
| 25175 | + | |
| 25176 | + | |
| 25177 | + | |
| 25178 | + | |
| 25179 | + | |
| 25180 | + | |
| 25181 | + | |
| 25182 | + | |
| 25183 | + | |
| 25184 | + | |
| 25185 | + | |
| 25186 | + | |
| 25187 | + | |
| 25188 | + | |
| 25189 | + | |
| 25190 | + | |
| 25191 | + | |
| 25192 | + | |
| 25193 | + | |
| 25194 | + | |
| 25195 | + | |
| 25196 | + | |
| 25197 | + | |
25141 | 25198 | | |
25142 | 25199 | | |
25143 | 25200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
129 | 170 | | |
130 | 171 | | |
131 | 172 | | |
| |||
0 commit comments