@@ -32,13 +32,13 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
3232 if ( result !== false ) return result ;
3333 }
3434
35- if ( support . hexNumber == true &&
35+ if ( support . hexNumber &&
3636 ( ( ch == "0" && stream . match ( / ^ [ x X ] [ 0 - 9 a - f A - F ] + / ) )
3737 || ( ch == "x" || ch == "X" ) && stream . match ( / ^ ' [ 0 - 9 a - f A - F ] + ' / ) ) ) {
3838 // hex
3939 // ref: http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html
4040 return "number" ;
41- } else if ( support . binaryNumber == true &&
41+ } else if ( support . binaryNumber &&
4242 ( ( ( ch == "b" || ch == "B" ) && stream . match ( / ^ ' [ 0 1 ] + ' / ) )
4343 || ( ch == "0" && stream . match ( / ^ b [ 0 1 ] + / ) ) ) ) {
4444 // bitstring
@@ -48,7 +48,7 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
4848 // numbers
4949 // ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html
5050 stream . match ( / ^ [ 0 - 9 ] * \. ? [ 0 - 9 ] + ( [ e E ] [ - + ] ? [ 0 - 9 ] + ) ? / ) ;
51- support . decimallessFloat == true && stream . eat ( '.' ) ;
51+ support . decimallessFloat && stream . eat ( '.' ) ;
5252 return "number" ;
5353 } else if ( ch == "?" && ( stream . eatSpace ( ) || stream . eol ( ) || stream . eat ( ";" ) ) ) {
5454 // placeholders
@@ -58,8 +58,8 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
5858 // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
5959 state . tokenize = tokenLiteral ( ch ) ;
6060 return state . tokenize ( stream , state ) ;
61- } else if ( ( ( ( support . nCharCast == true && ( ch == "n" || ch == "N" ) )
62- || ( support . charsetCast == true && ch == "_" && stream . match ( / [ a - z ] [ a - z 0 - 9 ] * / i) ) )
61+ } else if ( ( ( ( support . nCharCast && ( ch == "n" || ch == "N" ) )
62+ || ( support . charsetCast && ch == "_" && stream . match ( / [ a - z ] [ a - z 0 - 9 ] * / i) ) )
6363 && ( stream . peek ( ) == "'" || stream . peek ( ) == '"' ) ) ) {
6464 // charset casting: _utf8'str', N'str', n'str'
6565 // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html
@@ -84,12 +84,12 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
8484 return state . tokenize ( stream , state ) ;
8585 } else if ( ch == "." ) {
8686 // .1 for 0.1
87- if ( support . zerolessFloat == true && stream . match ( / ^ (?: \d + (?: e [ + - ] ? \d + ) ? ) / i) ) {
87+ if ( support . zerolessFloat && stream . match ( / ^ (?: \d + (?: e [ + - ] ? \d + ) ? ) / i) ) {
8888 return "number" ;
8989 }
9090 // .table_name (ODBC)
9191 // // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html
92- if ( support . ODBCdotTable == true && stream . match ( / ^ [ a - z A - Z _ ] + / ) ) {
92+ if ( support . ODBCdotTable && stream . match ( / ^ [ a - z A - Z _ ] + / ) ) {
9393 return "variable-2" ;
9494 }
9595 } else if ( operatorChars . test ( ch ) ) {
0 commit comments