Skip to content

Commit

Permalink
js_printer evanw#184 in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
stoand committed Mar 13, 2023
1 parent 514b771 commit 8477fe6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/js_printer/js_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1766,8 +1766,10 @@ func (p *printer) printExpr(expr js_ast.Expr, level js_ast.L, flags printExprFla
p.addSourceMapping(expr.Loc)
// p.builder.UpdateGeneratedLineAndColumn(p.js)

var fileName = strings.Split(string(p.js), "\n")[0]

p.print(fmt.Sprintf("__INST(%d,%d, %s, ", p.builder.GetPrevGeneratedLine(),
p.builder.GetPrevGeneratedColumn(), p.builder.GetPrevOriginalName()))
p.builder.GetPrevGeneratedColumn(), fileName))

// If syntax compression is enabled, do a pre-pass over unary and binary
// operators to inline bitwise operations of cross-module inlined constants.
Expand Down

0 comments on commit 8477fe6

Please sign in to comment.