Permalink
Browse files

simplify converter

  • Loading branch information...
1 parent 6001ba8 commit ff1282556b5fb760abad06790e92de5ef7c18604 @nightwing nightwing committed Feb 12, 2013
Showing with 153 additions and 274 deletions.
  1. +16 −34 tool/mode_highlight_rules.tmpl.js
  2. +137 −240 tool/tmlanguage.js
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012, Ajax.org B.V.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@@ -14,7 +14,7 @@
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -26,35 +26,19 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- *
- * Contributor(s):
- *
- *
- *
* ***** END LICENSE BLOCK ***** */
-/*
- THIS FILE WAS AUTOGENERATED BY %name% (UUID: %uuid%) */
-
-/*******
-
- THIS FILE MIGHT NOT BE PERFECT, PARTICULARLY:
-
- IN DECIDING STATES TO TRANSITION TO,
-
- IGNORING WHITESPACE,
-
- IGNORING GROUPS WITH ?:,
-
- EXTENDING EXISTING MODES,
-
- GATHERING KEYWORDS, OR
-
- RULE PREFERENCE ORDER.
-
- ...But it's a good start from an existing *.tmlanguage file.
-
-*******/
+/* THIS FILE WAS AUTOGENERATED FROM %name% (UUID: %uuid%) */
+/****************************************************************
+ * IT MIGHT NOT BE PERFECT, PARTICULARLY: *
+ * IN DECIDING STATES TO TRANSITION TO, *
+ * IGNORING WHITESPACE, *
+ * IGNORING GROUPS WITH ?:, *
+ * EXTENDING EXISTING MODES, *
+ * GATHERING KEYWORDS, OR *
+ * DECIDING WHEN TO USE PUSH. *
+ * ...But it's a good start from an existing *.tmlanguage file. *
+ ****************************************************************/
define(function(require, exports, module) {
"use strict";
@@ -63,14 +47,12 @@ var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var %language%HighlightRules = function() {
-
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
- this.$rules =
- %languageTokens%
-
- %repositoryRules%
+ this.$rules = %languageTokens%
+
+ this.normalizeRules();
};
oop.inherits(%language%HighlightRules, TextHighlightRules);
Oops, something went wrong.

0 comments on commit ff12825

Please sign in to comment.