Remove regex from TextMateGrammar's Pattern class

We build a native `OnigScanner` object at the `Rule` level which tries to match every regex for the entire rule, rather than using an individual regex for each pattern from the JS side.
This commit is contained in:
Nathan Sobo
2012-10-25 12:07:13 -06:00
parent 1a8305ee2a
commit 33c6fe8009

View File

@@ -121,7 +121,6 @@ class Pattern
pushRule: null
popRule: false
scopeName: null
regex: null
captures: null
backReferences: null
@@ -131,11 +130,9 @@ class Pattern
if @hasBackReferences = hasBackReferences ? /\\\d+/.test(match)
@match = match
else
@regex = new OnigRegExp(match)
@regexSource = match
@captures = captures
else if begin
@regex = new OnigRegExp(begin)
@regexSource = begin
@captures = beginCaptures ? captures
endPattern = new Pattern(@grammar, { match: end, captures: endCaptures ? captures, popRule: true})