File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
package esbuildplugin
2
2
3
3
import (
4
+ "context"
5
+ "runtime/pprof"
6
+
4
7
"github.com/evanw/esbuild/pkg/api"
5
8
"github.com/samsarahq/go/oops"
6
9
"github.com/stephen/cssc"
@@ -86,6 +89,7 @@ func Plugin(opts ...Option) api.Plugin {
86
89
options = opt (options )
87
90
}
88
91
92
+ pprof .SetGoroutineLabels (pprof .WithLabels (context .TODO (), pprof .Labels ("cssc-path" , args .Path )))
89
93
result := cssc .Compile (options )
90
94
91
95
if len (errors ) > 0 {
Original file line number Diff line number Diff line change @@ -408,7 +408,13 @@ func (p *parser) parseValue() ast.Value {
408
408
fn .Arguments = append (fn .Arguments , p .parseMathExpression ())
409
409
continue
410
410
}
411
- fn .Arguments = append (fn .Arguments , p .parseValue ())
411
+ val := p .parseValue ()
412
+ if val == nil {
413
+ // XXX: there's probably some backtracking to do here?
414
+ break arguments
415
+ }
416
+
417
+ fn .Arguments = append (fn .Arguments , val )
412
418
}
413
419
}
414
420
You can’t perform that action at this time.
0 commit comments