mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Fixes #2765 -- incorrect line number in mappings
This commit is contained in:
parent
b2ef77d92e
commit
b62a90d54c
3 changed files with 4 additions and 3 deletions
2
Cakefile
2
Cakefile
|
@ -93,7 +93,7 @@ task 'build:ultraviolet', 'build and install the Ultraviolet syntax highlighter'
|
|||
|
||||
task 'build:browser', 'rebuild the merged script for inclusion in the browser', ->
|
||||
code = ''
|
||||
for name in ['helpers', 'rewriter', 'lexer', 'parser', 'scope', 'nodes', 'coffee-script', 'browser']
|
||||
for name in ['helpers', 'rewriter', 'lexer', 'parser', 'scope', 'nodes', 'sourcemap', 'coffee-script', 'browser']
|
||||
code += """
|
||||
require['./#{name}'] = new function() {
|
||||
var exports = this;
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
sourceMap = new sourcemap.SourceMap();
|
||||
}
|
||||
fragments = (parser.parse(lexer.tokenize(code, options))).compileToFragments(options);
|
||||
currentLine = 0;
|
||||
currentLine = 2;
|
||||
currentColumn = 0;
|
||||
js = "";
|
||||
for (_j = 0, _len1 = fragments.length; _j < _len1; _j++) {
|
||||
|
|
|
@ -49,7 +49,8 @@ exports.compile = compile = (code, options = {}) ->
|
|||
|
||||
fragments = (parser.parse lexer.tokenize(code, options)).compileToFragments options
|
||||
|
||||
currentLine = 0
|
||||
# Two lines of comments will start the JS file.
|
||||
currentLine = 2
|
||||
currentColumn = 0
|
||||
js = ""
|
||||
for fragment in fragments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue