mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
fixing regex-interpolation-sans-flags issue.
This commit is contained in:
@@ -206,7 +206,10 @@
|
||||
});
|
||||
this.tokens = this.tokens.concat([['(', '('], ['NEW', 'new'], ['IDENTIFIER', 'RegExp'], ['CALL_START', '(']]);
|
||||
this.interpolateString(("\"" + str + "\""), true);
|
||||
this.tokens = this.tokens.concat([[',', ','], ['STRING', ("\"" + flags + "\"")], [')', ')'], [')', ')']]);
|
||||
if (flags) {
|
||||
this.tokens.splice(this.tokens.length, 0, [',', ','], ['STRING', ("\"" + flags + "\"")]);
|
||||
}
|
||||
this.tokens.splice(this.tokens.length, 0, [')', ')'], [')', ')']);
|
||||
} else {
|
||||
this.token('REGEX', regex);
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
var __extends = function(child, parent) {
|
||||
var ctor = function(){ };
|
||||
ctor.prototype = parent.prototype;
|
||||
child.__superClass__ = parent.prototype;
|
||||
child.prototype = new ctor();
|
||||
child.prototype.constructor = child;
|
||||
if (typeof parent.extended === "function") parent.extended(child);
|
||||
child.__superClass__ = parent.prototype;
|
||||
};
|
||||
if (typeof process !== "undefined" && process !== null) {
|
||||
Scope = require('./scope').Scope;
|
||||
|
||||
Reference in New Issue
Block a user