File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,19 @@ type SketchSourceMerger struct{}
4141func (s * SketchSourceMerger ) Run (context map [string ]interface {}) error {
4242 sketch := context [constants .CTX_SKETCH ].(* types.Sketch )
4343
44+ lineOffset := 0
4445 includeSection := composeIncludeArduinoSection ()
46+ lineOffset += 2
4547 context [constants .CTX_INCLUDE_SECTION ] = includeSection
4648
4749 source := includeSection
4850 source += addSourceWrappedWithLineDirective (& sketch .MainFile )
51+ lineOffset += 1
4952 for _ , file := range sketch .OtherSketchFiles {
5053 source += addSourceWrappedWithLineDirective (& file )
5154 }
5255
53- context [constants .CTX_LINE_OFFSET ] = 3
56+ context [constants .CTX_LINE_OFFSET ] = lineOffset
5457 context [constants .CTX_SOURCE ] = source
5558
5659 return nil
You can’t perform that action at this time.
0 commit comments