mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-27 12:49:45 +03:00
syntax: sql: add a few more missing keywords, like TRUE and FALSE
Also, don't first scare-color stuff between double quotes, as it seems some dialects put certain calculations between them too.
This commit is contained in:
parent
d6f101daef
commit
5cec57719b
@ -15,15 +15,15 @@ icolor #0a4 "\<(date|int[48]|num|ts|tstz)range\>"
|
||||
icolor #48c "\<(ABORT|AGGREGATE|ALL|ALTER|ANALYZE|AND|ANY|AS|BEGIN|BETWEEN|CAST|CHECKPOINT)\>"
|
||||
icolor #48c "\<(CLOSE|CLUSTER|COLLATION|COMMENT|COMMIT|CONSTRAINTS?|CONVERSION|COPY|CREATE)\>"
|
||||
icolor #48c "\<(DATABASE|DEALLOCATE|DECLARE|DEFAULT|DELETE|DISCARD|DISTINCT|DO|DOMAIN|DROP)\>"
|
||||
icolor #48c "\<(END|EXCEPT|EXECUTE|EXISTS|EXPLAIN|EXTENSION|FETCH|FOREIGN (DATA WRAPPER|SCHEMA|TABLE))\>"
|
||||
icolor #48c "\<(END|EXCEPT|EXECUTE|EXISTS|EXPLAIN|EXTENSION|FALSE|FETCH|FOREIGN (DATA WRAPPER|SCHEMA|TABLE))\>"
|
||||
icolor #48c "\<(FROM|FUNCTION|GRANT|GROUP( BY)?|HAVING|IN|INDEX|INSERT|INTERSECT|INTO|IS)\>"
|
||||
icolor #48c "\<(NATURAL )?(INNER |OUTER |CROSS |(LEFT|RIGHT|FULL)( OUTER)? )?JOIN\>"
|
||||
icolor #48c "\<((PRIMARY|FOREIGN) KEY|LANGUAGE|LOAD|LIKE|LOCK|MOVE|NOT|NOTIFY|NULL)\>"
|
||||
icolor #48c "\<(ON|ONLY|OPERATOR( CLASS| FAMILY)?|OR|ORDER BY|PREPARED?|PRIVILEGES)\>"
|
||||
icolor #48c "\<(RELEASE|RESET|RETURN(S|ING)|REVOKE|ROLE|ROLLBACK|RULE|SAVEPOINT|SCHEMA)\>"
|
||||
icolor #48c "\<(SELECT|SEQUENCE|SERVER|SESSION AUTHORIZATION|SET|SHOW|START|SYSTEM)\>"
|
||||
icolor #48c "\<(ON|ONLY|OPERATOR( CLASS| FAMILY)?|OR|ORDER BY|PREPARED?|PRIVILEGES|PROCEDURE)\>"
|
||||
icolor #48c "\<(REFERENCES|RELEASE|REPLACE|RESET|RETURN(S|ING)|REVOKE|ROLE|ROLLBACK|RULE|SAVEPOINT|SCHEMA)\>"
|
||||
icolor #48c "\<(SELECT|SEQUENCE|SERVER|SESSION AUTHORIZATION|SET|SHOW|SIMILAR|START|SYSTEM)\>"
|
||||
icolor #48c "\<(TABLE(SPACE)?|TEXT SEARCH (CONFIGURATION|DICTIONARY|PARSER|TEMPLATE))\>"
|
||||
icolor #48c "\<(TO|TRANSACTION|(EVENT )?TRIGGER|TYPE|UNION|UPDATE|USER( MAPPING)?|USING)\>"
|
||||
icolor #48c "\<(TO|TRANSACTION|(EVENT )?TRIGGER|TRUE|TRUNCATE|TYPE|UNION|UNIQUE|UPDATE|USER( MAPPING)?|USING)\>"
|
||||
icolor #48c "\<(VACUUM|VALUES|((REFRESH )?MATERIALIZED )?VIEW|WHERE|WITH)\>"
|
||||
|
||||
# Flow control.
|
||||
@ -31,8 +31,7 @@ icolor #cc0 "\<(CASE|WHEN|IF|THEN|ELSE|ELSE?IF|LOOP|CONTINUE|EXIT)\>"
|
||||
icolor #cc0 "\<(FOR|FOREACH|IN|WHILE|END (CASE|IF|LOOP))\>"
|
||||
icolor #a4a "\<(RAISE|EXCEPTION|NOTICE|RETURN)\>"
|
||||
|
||||
# Quoted identifiers. (First scare-color all, then uncolor what is valid.)
|
||||
color ,red ""[^"]+""
|
||||
# Quoted identifiers.
|
||||
color normal ""[[:alpha:]_][[:alnum:]_$]*""
|
||||
|
||||
# Strings.
|
||||
|
Loading…
Reference in New Issue
Block a user