We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90b63a5 commit 4d77fe6Copy full SHA for 4d77fe6
src/arduino.cc/builder/sketch_source_merger.go
@@ -41,16 +41,19 @@ type SketchSourceMerger struct{}
41
func (s *SketchSourceMerger) Run(context map[string]interface{}) error {
42
sketch := context[constants.CTX_SKETCH].(*types.Sketch)
43
44
+ lineOffset := 0
45
includeSection := composeIncludeArduinoSection()
46
+ lineOffset += 2
47
context[constants.CTX_INCLUDE_SECTION] = includeSection
48
49
source := includeSection
50
source += addSourceWrappedWithLineDirective(&sketch.MainFile)
51
+ lineOffset += 1
52
for _, file := range sketch.OtherSketchFiles {
53
source += addSourceWrappedWithLineDirective(&file)
54
}
55
- context[constants.CTX_LINE_OFFSET] = 3
56
+ context[constants.CTX_LINE_OFFSET] = lineOffset
57
context[constants.CTX_SOURCE] = source
58
59
return nil
0 commit comments