aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/output.js b/lib/output.js
index b0a01613..571dd106 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -287,6 +287,7 @@ function OutputStream(options) {
last : function() { return last },
semicolon : semicolon,
force_semicolon : force_semicolon,
+ to_ascii : to_ascii,
print_name : function(name) { print(make_name(name)) },
print_string : function(str) { print(encode_string(str)) },
next_indent : next_indent,
@@ -982,10 +983,10 @@ function OutputStream(options) {
output.print(make_num(self.getValue()));
});
DEFPRINT(AST_RegExp, function(self, output){
- output.print("/");
- output.print(self.pattern);
- output.print("/");
- if (self.mods) output.print(self.mods);
+ var str = self.getValue().toString();
+ if (output.option("ascii_only"))
+ str = output.to_ascii(str);
+ output.print(str);
});
function force_statement(stat, output) {