File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ protected function scan($sql2)
152152 $ tokens = array ();
153153 $ token = strtok ($ sql2 , " \n\t" );
154154 while ($ token !== false ) {
155-
156155 $ this ->tokenize ($ tokens , $ token );
157156 $ token = strtok (" \n\t" );
158157 }
Original file line number Diff line number Diff line change @@ -731,7 +731,12 @@ protected function parseLiteral()
731731 if ('' === $ nextToken ) {
732732 break ;
733733 }
734- $ token .= $ nextToken ;
734+ // TODO: the scanner kills spaces, tabs and newlines
735+ // So adding a space here is just a hack for the most common token separator we can expect.
736+ // The proper way would require that the scanner tracks the token separators so that we
737+ // could fetch the separator between the last fetched token and the token before that token
738+ // so that we can append it instead of this hardcoded single space, ie. ' '
739+ $ token .= ' ' .$ nextToken ;
735740 }
736741
737742 if (substr ($ token , -1 ) !== $ quoteString ) {
You can’t perform that action at this time.
0 commit comments