Skip to content

Commit

Permalink
simplify converter
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Feb 16, 2013
1 parent 6001ba8 commit ff12825
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 274 deletions.
50 changes: 16 additions & 34 deletions tool/mode_highlight_rules.tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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";
Expand All @@ -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);
Expand Down
Loading

0 comments on commit ff12825

Please sign in to comment.