From cc401771142d31ae0f3132d01470fac797697647 Mon Sep 17 00:00:00 2001 From: Joshua Saxby Date: Fri, 27 Mar 2015 22:11:41 +0000 Subject: [PATCH] Revert "add some new types and change the type of existing keywords" This reverts commit fcb4023e5200e0bea54456668d5267af7f6a8548. --- lib/ace/mode/sql_highlight_rules.js | 13 ++++++------- lib/ace/snippets/mask.js | 7 ------- lib/ace/snippets/mask.snippets | 0 3 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 lib/ace/snippets/mask.js delete mode 100644 lib/ace/snippets/mask.snippets diff --git a/lib/ace/mode/sql_highlight_rules.js b/lib/ace/mode/sql_highlight_rules.js index a74bce26..5030ecc7 100644 --- a/lib/ace/mode/sql_highlight_rules.js +++ b/lib/ace/mode/sql_highlight_rules.js @@ -38,7 +38,8 @@ var SqlHighlightRules = function() { var keywords = ( "select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|" + - "when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table" + "when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|" + + "foreign|not|references|default|null" ); var builtinConstants = ( @@ -50,14 +51,15 @@ var SqlHighlightRules = function() { ); var dataTypes = ( - "int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|timestamp|" + - "money|real|number|integer|timezone|smallint" + "int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|" + + "money|real|number" ); var keywordMapper = this.createKeywordMapper({ "support.function": builtinFunctions, "keyword": keywords, - "constant.language": builtinConstants + "constant.language": builtinConstants, + "storage.type": dataTypes }, "identifier", true); this.$rules = { @@ -89,9 +91,6 @@ var SqlHighlightRules = function() { }, { token : "paren.rparen", regex : "[\\)]" - }, { - token : "keyword.keyword", - regex : "(primary key)|if|(foreign key)|not|references|default|null|set|(drop database)|(drop table)" }, { token : "text", regex : "\\s+" diff --git a/lib/ace/snippets/mask.js b/lib/ace/snippets/mask.js deleted file mode 100644 index 7fbca678..00000000 --- a/lib/ace/snippets/mask.js +++ /dev/null @@ -1,7 +0,0 @@ -define(function(require, exports, module) { -"use strict"; - -exports.snippetText = require("../requirejs/text!./mask.snippets"); -exports.scope = "mask"; - -}); diff --git a/lib/ace/snippets/mask.snippets b/lib/ace/snippets/mask.snippets deleted file mode 100644 index e69de29b..00000000