better support for multiple input files:

- use a single AST_Toplevel node for all files
- keep original source filename in the tokens
This commit is contained in:
Mihai Bazon
2012-09-21 14:19:05 +03:00
parent c4f8c2103f
commit 5491e1d7b1
6 changed files with 96 additions and 93 deletions

View File

@@ -54,7 +54,8 @@ function OutputStream(options) {
max_line_len : 32000,
ie_proof : true,
beautify : true,
source_map : null
source_map : null,
in_source_map : null
});
var indentation = 0;
@@ -245,6 +246,7 @@ function OutputStream(options) {
var add_mapping = options.source_map ? function(token, name) {
options.source_map.add(
token.file,
current_line, current_col,
token.line, token.col,
(!name && token.type == "name") ? token.value : name