reverted 4622 codemirror3 because broke zencoding and drops support for IE7, we do not use the new features anyway. Sorry

This commit is contained in:
mdipierro
2013-01-23 08:17:59 -06:00
parent b7f2991246
commit b1f77b9c4a
47 changed files with 4458 additions and 7601 deletions
+9 -3
View File
@@ -16,7 +16,7 @@
return arr.indexOf(item) != -1;
}
function scriptHint(editor, _keywords, getToken) {
function scriptHint(editor, keywords, getToken) {
// Find the token at the cursor
var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;
// If it's not a 'word-style' token, ignore the token.
@@ -45,6 +45,12 @@
return scriptHint(editor, pigKeywordsU, function (e, cur) {return e.getTokenAt(cur);});
};
function toTitleCase(str) {
return str.replace(/(?:^|\s)\w/g, function(match) {
return match.toUpperCase();
});
}
var pigKeywords = "VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP "
+ "JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL "
+ "PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE "
@@ -103,9 +109,9 @@
// find in the current environment.
var obj = context.pop(), base;
if (obj.type == "variable")
if (obj.className == "pig-word")
base = obj.string;
else if(obj.type == "variable-3")
else if(obj.className == "pig-type")
base = ":" + obj.string;
while (base != null && context.length)