Changing names of grammar elements.
Starting with an "_" will prevent collisions with extensions
This commit is contained in:
parent
9609b1d5b7
commit
1ffcd785f8
@ -1,7 +1,9 @@
|
||||
grammar JavascriptRegexp
|
||||
root <- ( ( "/" regexp "/" fl:[igm]* ) / regexp ""? ) <Root>
|
||||
regexp <- match alternates:( "|" match )* <Regexp>
|
||||
match <- anchor_start? ( ( subexp / charset / terminal ) repeat? )* anchor_end? <Match>
|
||||
root <- ( ( "/" regexp "/" _flags:[igm]* ) / regexp ""? ) <Root>
|
||||
regexp <- _match:match _alternates:( "|" match )* <Regexp>
|
||||
match <- _anchor_start:anchor_start?
|
||||
_parts:( ( subexp / charset / terminal ) repeat? )*
|
||||
_anchor_end:anchor_end? <Match>
|
||||
anchor_start <- "^"
|
||||
anchor_end <- "$"
|
||||
repeat <- ( repeat_any / repeat_required / repeat_optional / repeat_spec ) repeat_greedy?
|
||||
|
@ -60,6 +60,6 @@ export default _.extend({}, Base, {
|
||||
},
|
||||
|
||||
matches() {
|
||||
return [this.match].concat(_.map(this.alternates.elements, _.property('match')));
|
||||
return [this._match].concat(_.map(this._alternates.elements, _.property('match')));
|
||||
}
|
||||
});
|
||||
|
@ -33,8 +33,8 @@ export default _.extend({}, Base, {
|
||||
flags() {
|
||||
var flags;
|
||||
|
||||
if (this.fl) {
|
||||
flags = this.fl.textValue;
|
||||
if (this._flags) {
|
||||
flags = this._flags.textValue;
|
||||
} else {
|
||||
flags = '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user