mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
sql parser支持中文空格和逗号
This commit is contained in:
@@ -53,7 +53,10 @@ public class CharTypes {
|
||||
}
|
||||
|
||||
public static boolean isFirstIdentifierChar(char c) {
|
||||
return c > firstIdentifierFlags.length || firstIdentifierFlags[c];
|
||||
if (c <= firstIdentifierFlags.length) {
|
||||
return firstIdentifierFlags[c];
|
||||
}
|
||||
return c != ' ' && c != ',';
|
||||
}
|
||||
|
||||
private final static boolean[] identifierFlags = new boolean[256];
|
||||
@@ -74,7 +77,10 @@ public class CharTypes {
|
||||
}
|
||||
|
||||
public static boolean isIdentifierChar(char c) {
|
||||
return c > identifierFlags.length || identifierFlags[c];
|
||||
if (c <= identifierFlags.length) {
|
||||
return identifierFlags[c];
|
||||
}
|
||||
return c != ' ' && c != ',';
|
||||
}
|
||||
|
||||
private final static boolean[] whitespaceFlags = new boolean[256];
|
||||
@@ -93,7 +99,7 @@ public class CharTypes {
|
||||
*/
|
||||
public static boolean isWhitespace(char c) {
|
||||
return (c <= whitespaceFlags.length && whitespaceFlags[c]) //
|
||||
|| c == ' '; // Chinese space
|
||||
|| c == ' '; // Chinese space
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user