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{}
41
41
func (s * SketchSourceMerger ) Run (context map [string ]interface {}) error {
42
42
sketch := context [constants .CTX_SKETCH ].(* types.Sketch )
43
43
44
+ lineOffset := 0
44
45
includeSection := composeIncludeArduinoSection ()
46
+ lineOffset += 2
45
47
context [constants .CTX_INCLUDE_SECTION ] = includeSection
46
48
47
49
source := includeSection
48
50
source += addSourceWrappedWithLineDirective (& sketch .MainFile )
51
+ lineOffset += 1
49
52
for _ , file := range sketch .OtherSketchFiles {
50
53
source += addSourceWrappedWithLineDirective (& file )
51
54
}
52
55
53
- context [constants .CTX_LINE_OFFSET ] = 3
56
+ context [constants .CTX_LINE_OFFSET ] = lineOffset
54
57
context [constants .CTX_SOURCE ] = source
55
58
56
59
return nil
You can’t perform that action at this time.
0 commit comments