When printing out --tokens, hide the location data.
This commit is contained in:
parent
8435df29c6
commit
3b25aea168
|
@ -420,7 +420,7 @@
|
|||
};
|
||||
|
||||
printTokens = function(tokens) {
|
||||
var locationData, strings, tag, token, value;
|
||||
var strings, tag, token, value;
|
||||
strings = (function() {
|
||||
var _i, _len, _results;
|
||||
_results = [];
|
||||
|
@ -428,8 +428,7 @@
|
|||
token = tokens[_i];
|
||||
tag = token[0];
|
||||
value = token[1].toString().replace(/\n/, '\\n');
|
||||
locationData = helpers.locationDataToString(token[2]);
|
||||
_results.push("[" + tag + " " + value + " " + locationData + "]");
|
||||
_results.push("[" + tag + " " + value + "]");
|
||||
}
|
||||
return _results;
|
||||
})();
|
||||
|
|
|
@ -282,13 +282,12 @@ lint = (file, js) ->
|
|||
jsl.stdin.write js
|
||||
jsl.stdin.end()
|
||||
|
||||
# Pretty-print a stream of tokens.
|
||||
# Pretty-print a stream of tokens, sans location data.
|
||||
printTokens = (tokens) ->
|
||||
strings = for token in tokens
|
||||
tag = token[0]
|
||||
value = token[1].toString().replace(/\n/, '\\n')
|
||||
locationData = helpers.locationDataToString token[2]
|
||||
"[#{tag} #{value} #{locationData}]"
|
||||
"[#{tag} #{value}]"
|
||||
printLine strings.join(' ')
|
||||
|
||||
# Use the [OptionParser module](optparse.html) to extract all options from
|
||||
|
|
Loading…
Reference in New Issue