simplify converter

This commit is contained in:
nightwing 2013-02-12 23:02:09 +04:00
commit ff1282556b
2 changed files with 196 additions and 317 deletions

View file

@ -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);