From e6faa6ab06421eb024c243235cb5ff16cb25b45e Mon Sep 17 00:00:00 2001 From: Joe Walker Date: Wed, 12 Jan 2011 01:14:40 +0000 Subject: [PATCH] tweak require lines for absolute paths to simplify startup --- lib/ace/mode/php.js | 12 ++++++------ lib/ace/mode/python.js | 12 ++++++------ lib/ace/mode/python_highlight_rules.js | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/ace/mode/php.js b/lib/ace/mode/php.js index 12efc3d7..4795cde9 100644 --- a/lib/ace/mode/php.js +++ b/lib/ace/mode/php.js @@ -34,15 +34,15 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ - + define(function(require, exports, module) { var oop = require("pilot/oop"); -var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; -var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; +var TextMode = require("ace/mode/text").Mode; +var Tokenizer = require("ace/tokenizer").Tokenizer; +var PhpHighlightRules = require("ace/mode/php_highlight_rules").PhpHighlightRules; +var MatchingBraceOutdent = require("ace/mode/matching_brace_outdent").MatchingBraceOutdent; +var Range = require("ace/range").Range; var Mode = function() { this.$tokenizer = new Tokenizer(new PhpHighlightRules().getRules()); diff --git a/lib/ace/mode/python.js b/lib/ace/mode/python.js index d60c08b0..7196f01b 100644 --- a/lib/ace/mode/python.js +++ b/lib/ace/mode/python.js @@ -34,15 +34,15 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ - + define(function(require, exports, module) { var oop = require("pilot/oop"); -var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; -var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; +var TextMode = require("ace/mode/text").Mode; +var Tokenizer = require("ace/tokenizer").Tokenizer; +var PythonHighlightRules = require("ace/mode/python_highlight_rules").PythonHighlightRules; +var MatchingBraceOutdent = require("ace/mode/matching_brace_outdent").MatchingBraceOutdent; +var Range = require("ace/range").Range; var Mode = function() { this.$tokenizer = new Tokenizer(new PythonHighlightRules().getRules()); diff --git a/lib/ace/mode/python_highlight_rules.js b/lib/ace/mode/python_highlight_rules.js index 5190178b..f4af5642 100644 --- a/lib/ace/mode/python_highlight_rules.js +++ b/lib/ace/mode/python_highlight_rules.js @@ -33,7 +33,7 @@ * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ***** END LICENSE BLOCK ***** + * ***** END LICENSE BLOCK ***** * * TODO: python delimiters */ @@ -42,7 +42,7 @@ define(function(require, exports, module) { var oop = require("pilot/oop"); var lang = require("pilot/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules; PythonHighlightRules = function() { @@ -50,12 +50,12 @@ PythonHighlightRules = function() { ("and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + "raise|return|try|while|with|yield").split("|") - ); - + ); + var builtinConstants = lang.arrayToMap( ("True|False|None|NotImplemented|Ellipsis|__debug__").split("|") ); - + var builtinFunctions = lang.arrayToMap( ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + @@ -66,19 +66,19 @@ PythonHighlightRules = function() { "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern").split("|") ); - + var futureReserved = lang.arrayToMap( ("").split("|") ); var strPre = "(?:(?:[rubRUB])|(?:[ubUB][rR]))?"; - + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; var octInteger = "(?:0[oO]?[0-7]+)"; var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; var binInteger = "(?:0[bB][01]+)"; var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; - + var exponent = "(?:[eE][+-]?\\d+)"; var fraction = "(?:\\.\\d+)"; var intPart = "(?:\\d+)";