diff --git a/src/arduino.cc/builder/prototypes_adder.go b/src/arduino.cc/builder/prototypes_adder.go index fb1d392c..5fa95c65 100644 --- a/src/arduino.cc/builder/prototypes_adder.go +++ b/src/arduino.cc/builder/prototypes_adder.go @@ -92,6 +92,7 @@ func composePrototypeSection(line int, prototypes []*types.Prototype) string { str := joinPrototypes(prototypes) str += "\n#line " str += strconv.Itoa(line) + str += " \"" + prototypes[0].File + "\"" str += "\n" return str diff --git a/src/arduino.cc/builder/sketch_source_merger.go b/src/arduino.cc/builder/sketch_source_merger.go index 2ff0bb66..d4cc71a3 100644 --- a/src/arduino.cc/builder/sketch_source_merger.go +++ b/src/arduino.cc/builder/sketch_source_merger.go @@ -48,7 +48,7 @@ func (s *SketchSourceMerger) Run(context map[string]interface{}) error { includeSection += "#include \n" lineOffset++ } - includeSection += "#line 1\n" + includeSection += "#line 1 \"" + strings.Replace((&sketch.MainFile).Name, "\\", "\\\\", -1) + "\"\n" lineOffset++ context[constants.CTX_INCLUDE_SECTION] = includeSection diff --git a/src/arduino.cc/builder/test/prototypes_adder_test.go b/src/arduino.cc/builder/test/prototypes_adder_test.go index b3d95a9c..6976b289 100644 --- a/src/arduino.cc/builder/test/prototypes_adder_test.go +++ b/src/arduino.cc/builder/test/prototypes_adder_test.go @@ -82,8 +82,8 @@ func TestPrototypesAdderBridgeExample(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - require.Equal(t, "#line 33 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 46 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 62 \""+absoluteSketchLocation+"\"\nvoid process(BridgeClient client);\n#line 82 \""+absoluteSketchLocation+"\"\nvoid digitalCommand(BridgeClient client);\n#line 109 \""+absoluteSketchLocation+"\"\nvoid analogCommand(BridgeClient client);\n#line 149 \""+absoluteSketchLocation+"\"\nvoid modeCommand(BridgeClient client);\n#line 33\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#line 33 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 46 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 62 \""+absoluteSketchLocation+"\"\nvoid process(BridgeClient client);\n#line 82 \""+absoluteSketchLocation+"\"\nvoid digitalCommand(BridgeClient client);\n#line 109 \""+absoluteSketchLocation+"\"\nvoid analogCommand(BridgeClient client);\n#line 149 \""+absoluteSketchLocation+"\"\nvoid modeCommand(BridgeClient client);\n#line 33 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) } func TestPrototypesAdderSketchWithIfDef(t *testing.T) { @@ -418,8 +418,8 @@ func TestPrototypesAdderSketchWithConfig(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - require.Equal(t, "#line 13 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 17 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 13\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#line 13 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 17 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 13 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) preprocessed := LoadAndInterpolate(t, filepath.Join("sketch_with_config", "sketch_with_config.preprocessed.txt"), context) require.Equal(t, preprocessed, strings.Replace(context[constants.CTX_SOURCE].(string), "\r\n", "\n", -1)) @@ -433,6 +433,9 @@ func TestPrototypesAdderSketchNoFunctionsTwoFiles(t *testing.T) { buildPath := SetupBuildPath(t, context) defer os.RemoveAll(buildPath) + sketchLocation := filepath.Join("sketch_no_functions_two_files", "main.ino") + absoluteSketchLocation := strings.Replace(Abs(t, sketchLocation), "\\", "\\\\", -1) + context[constants.CTX_HARDWARE_FOLDERS] = []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"} context[constants.CTX_TOOLS_FOLDERS] = []string{"downloaded_tools"} context[constants.CTX_FQBN] = "arduino:avr:leonardo" @@ -462,7 +465,7 @@ func TestPrototypesAdderSketchNoFunctionsTwoFiles(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) require.Nil(t, context[constants.CTX_PROTOTYPE_SECTION]) } @@ -474,6 +477,9 @@ func TestPrototypesAdderSketchNoFunctions(t *testing.T) { buildPath := SetupBuildPath(t, context) defer os.RemoveAll(buildPath) + sketchLocation := filepath.Join("sketch_no_functions", "main.ino") + absoluteSketchLocation := strings.Replace(Abs(t, sketchLocation), "\\", "\\\\", -1) + context[constants.CTX_HARDWARE_FOLDERS] = []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"} context[constants.CTX_TOOLS_FOLDERS] = []string{"downloaded_tools"} context[constants.CTX_FQBN] = "arduino:avr:leonardo" @@ -503,7 +509,7 @@ func TestPrototypesAdderSketchNoFunctions(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) require.Nil(t, context[constants.CTX_PROTOTYPE_SECTION]) } @@ -547,8 +553,8 @@ func TestPrototypesAdderSketchWithDefaultArgs(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - require.Equal(t, "#line 4 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 7 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 1\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#line 4 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 7 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) } func TestPrototypesAdderSketchWithInlineFunction(t *testing.T) { @@ -591,9 +597,9 @@ func TestPrototypesAdderSketchWithInlineFunction(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) - expected := "#line 1 \"" + absoluteSketchLocation + "\"\nvoid setup();\n#line 2 \"" + absoluteSketchLocation + "\"\nvoid loop();\n#line 4 \"" + absoluteSketchLocation + "\"\nshort unsigned int testInt();\n#line 8 \"" + absoluteSketchLocation + "\"\nstatic int8_t testInline();\n#line 12 \"" + absoluteSketchLocation + "\"\n__attribute__((always_inline)) uint8_t testAttribute();\n#line 1\n" + expected := "#line 1 \"" + absoluteSketchLocation + "\"\nvoid setup();\n#line 2 \"" + absoluteSketchLocation + "\"\nvoid loop();\n#line 4 \"" + absoluteSketchLocation + "\"\nshort unsigned int testInt();\n#line 8 \"" + absoluteSketchLocation + "\"\nstatic int8_t testInline();\n#line 12 \"" + absoluteSketchLocation + "\"\n__attribute__((always_inline)) uint8_t testAttribute();\n#line 1 \"" + absoluteSketchLocation + "\"\n" obtained := context[constants.CTX_PROTOTYPE_SECTION].(string) // ctags based preprocessing removes "inline" but this is still OK // TODO: remove this exception when moving to a more powerful parser @@ -646,8 +652,8 @@ func TestPrototypesAdderSketchWithFunctionSignatureInsideIFDEF(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - require.Equal(t, "#line 1 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 3 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 15 \""+absoluteSketchLocation+"\"\nint8_t adalight();\n#line 1\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#line 1 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 3 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 15 \""+absoluteSketchLocation+"\"\nint8_t adalight();\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) } func TestPrototypesAdderSketchWithUSBCON(t *testing.T) { @@ -690,8 +696,8 @@ func TestPrototypesAdderSketchWithUSBCON(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - require.Equal(t, "#line 5 \""+absoluteSketchLocation+"\"\nvoid ciao();\n#line 10 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 15 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 5\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#line 5 \""+absoluteSketchLocation+"\"\nvoid ciao();\n#line 10 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 15 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 5 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) } func TestPrototypesAdderSketchWithTypename(t *testing.T) { @@ -733,8 +739,8 @@ func TestPrototypesAdderSketchWithTypename(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - expected := "#line 6 \"" + absoluteSketchLocation + "\"\nvoid setup();\n#line 10 \"" + absoluteSketchLocation + "\"\nvoid loop();\n#line 12 \"" + absoluteSketchLocation + "\"\ntypename Foo::Bar func();\n#line 6\n" + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + expected := "#line 6 \"" + absoluteSketchLocation + "\"\nvoid setup();\n#line 10 \"" + absoluteSketchLocation + "\"\nvoid loop();\n#line 12 \"" + absoluteSketchLocation + "\"\ntypename Foo::Bar func();\n#line 6 \"" + absoluteSketchLocation + "\"\n" obtained := context[constants.CTX_PROTOTYPE_SECTION].(string) // ctags based preprocessing ignores line with typename // TODO: remove this exception when moving to a more powerful parser @@ -783,8 +789,8 @@ func TestPrototypesAdderSketchWithIfDef2(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - require.Equal(t, "#line 5 \""+absoluteSketchLocation+"\"\nvoid elseBranch();\n#line 9 \""+absoluteSketchLocation+"\"\nvoid f1();\n#line 10 \""+absoluteSketchLocation+"\"\nvoid f2();\n#line 12 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 14 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 5\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#line 5 \""+absoluteSketchLocation+"\"\nvoid elseBranch();\n#line 9 \""+absoluteSketchLocation+"\"\nvoid f1();\n#line 10 \""+absoluteSketchLocation+"\"\nvoid f2();\n#line 12 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 14 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 5 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) expectedSource := LoadAndInterpolate(t, filepath.Join("sketch_with_ifdef", "sketch.preprocessed.txt"), context) require.Equal(t, expectedSource, strings.Replace(context[constants.CTX_SOURCE].(string), "\r\n", "\n", -1)) @@ -830,8 +836,8 @@ func TestPrototypesAdderSketchWithIfDef2SAM(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - require.Equal(t, "#line 2 \""+absoluteSketchLocation+"\"\nvoid ifBranch();\n#line 9 \""+absoluteSketchLocation+"\"\nvoid f1();\n#line 10 \""+absoluteSketchLocation+"\"\nvoid f2();\n#line 12 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 14 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 2\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#line 2 \""+absoluteSketchLocation+"\"\nvoid ifBranch();\n#line 9 \""+absoluteSketchLocation+"\"\nvoid f1();\n#line 10 \""+absoluteSketchLocation+"\"\nvoid f2();\n#line 12 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 14 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 2 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) expectedSource := LoadAndInterpolate(t, filepath.Join("sketch_with_ifdef", "sketch.preprocessed.SAM.txt"), context) require.Equal(t, expectedSource, strings.Replace(context[constants.CTX_SOURCE].(string), "\r\n", "\n", -1)) @@ -877,8 +883,8 @@ func TestPrototypesAdderSketchWithConst(t *testing.T) { NoError(t, err) } - require.Equal(t, "#include \n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string)) - require.Equal(t, "#line 1 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 2 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 4 \""+absoluteSketchLocation+"\"\nconst __FlashStringHelper* test();\n#line 6 \""+absoluteSketchLocation+"\"\nconst int test3();\n#line 8 \""+absoluteSketchLocation+"\"\nvolatile __FlashStringHelper* test2();\n#line 10 \""+absoluteSketchLocation+"\"\nvolatile int test4();\n#line 1\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) + require.Equal(t, "#include \n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string)) + require.Equal(t, "#line 1 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 2 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 4 \""+absoluteSketchLocation+"\"\nconst __FlashStringHelper* test();\n#line 6 \""+absoluteSketchLocation+"\"\nconst int test3();\n#line 8 \""+absoluteSketchLocation+"\"\nvolatile __FlashStringHelper* test2();\n#line 10 \""+absoluteSketchLocation+"\"\nvolatile int test4();\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_PROTOTYPE_SECTION].(string)) } func TestPrototypesAdderSketchWithDosEol(t *testing.T) { diff --git a/src/arduino.cc/builder/test/sketch2/SketchWithIfDef.preprocessed.txt b/src/arduino.cc/builder/test/sketch2/SketchWithIfDef.preprocessed.txt index 34e61fe8..4c7c7545 100644 --- a/src/arduino.cc/builder/test/sketch2/SketchWithIfDef.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch2/SketchWithIfDef.preprocessed.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #define DEBUG 1 #define DISABLED 0 @@ -26,7 +26,7 @@ void debug(); void disabledIsDefined(); #line 48 "{{EscapeBackSlashes .sketch.MainFile.Name}}" int useMyType(MyType type); -#line 16 +#line 16 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setup() { // put your setup code here, to run once: diff --git a/src/arduino.cc/builder/test/sketch3/Baladuino.preprocessed.txt b/src/arduino.cc/builder/test/sketch3/Baladuino.preprocessed.txt index e11411d8..fd7fd313 100644 --- a/src/arduino.cc/builder/test/sketch3/Baladuino.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch3/Baladuino.preprocessed.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" /* * The code is released under the GNU General Public License. @@ -92,7 +92,7 @@ WII Wii(&Btd); // The Wii library can communicate with Wiimotes and the Nunchuck void setup(); #line 204 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void loop(); -#line 88 +#line 88 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setup() { /* Initialize UART */ Serial.begin(115200); diff --git a/src/arduino.cc/builder/test/sketch4/CharWithEscapedDoubleQuote.preprocessed.txt b/src/arduino.cc/builder/test/sketch4/CharWithEscapedDoubleQuote.preprocessed.txt index caa42958..b7cfb728 100644 --- a/src/arduino.cc/builder/test/sketch4/CharWithEscapedDoubleQuote.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch4/CharWithEscapedDoubleQuote.preprocessed.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #include // required to send and receive AT commands from the GPRS Shield #include // required for I2C communication with the RTC @@ -81,7 +81,7 @@ void printTime(); void setup(); #line 334 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void loop(); -#line 39 +#line 39 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setPowerStateTo( int newState ) { if( newState != 1 && newState != 0 ) { // tests for an invalid state. In this case no change is made to powerstate diff --git a/src/arduino.cc/builder/test/sketch5/IncludeBetweenMultilineComment.preprocessed.txt b/src/arduino.cc/builder/test/sketch5/IncludeBetweenMultilineComment.preprocessed.txt index 1902c997..b29c05e7 100644 --- a/src/arduino.cc/builder/test/sketch5/IncludeBetweenMultilineComment.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch5/IncludeBetweenMultilineComment.preprocessed.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #include /* @@ -10,7 +10,7 @@ CapacitiveSensor cs_13_8 = CapacitiveSensor(13,8); void setup(); #line 10 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void loop(); -#line 6 +#line 6 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setup() { Serial.begin(9600); diff --git a/src/arduino.cc/builder/test/sketch6/LineContinuations.preprocessed.txt b/src/arduino.cc/builder/test/sketch6/LineContinuations.preprocessed.txt index 5742adcc..567d373c 100644 --- a/src/arduino.cc/builder/test/sketch6/LineContinuations.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch6/LineContinuations.preprocessed.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" const char *foo = "\ hello \ @@ -11,7 +11,7 @@ world\n"; void setup(); #line 11 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void loop(); -#line 7 +#line 7 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setup() { } diff --git a/src/arduino.cc/builder/test/sketch7/StringWithComment.preprocessed.txt b/src/arduino.cc/builder/test/sketch7/StringWithComment.preprocessed.txt index 9e6f2bcf..9700f3e2 100644 --- a/src/arduino.cc/builder/test/sketch7/StringWithComment.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch7/StringWithComment.preprocessed.txt @@ -1,11 +1,11 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setup(); #line 10 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void loop(); -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setup() { // put your setup code here, to run once: // "comment with a double quote diff --git a/src/arduino.cc/builder/test/sketch8/SketchWithStruct.preprocessed.txt b/src/arduino.cc/builder/test/sketch8/SketchWithStruct.preprocessed.txt index ea26c610..cdfcd34e 100644 --- a/src/arduino.cc/builder/test/sketch8/SketchWithStruct.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch8/SketchWithStruct.preprocessed.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" /* START CODE */ @@ -15,7 +15,7 @@ void setup(); void loop(); #line 17 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void dostuff (A_NEW_TYPE * bar); -#line 9 +#line 9 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setup() { } diff --git a/src/arduino.cc/builder/test/sketch_with_config/sketch_with_config.preprocessed.txt b/src/arduino.cc/builder/test/sketch_with_config/sketch_with_config.preprocessed.txt index f706e579..89ddbf6f 100644 --- a/src/arduino.cc/builder/test/sketch_with_config/sketch_with_config.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch_with_config/sketch_with_config.preprocessed.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #include "config.h" @@ -17,7 +17,7 @@ void setup(); #line 17 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void loop(); -#line 13 +#line 13 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void setup() { } diff --git a/src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.SAM.txt b/src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.SAM.txt index c483fd33..ae868905 100644 --- a/src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.SAM.txt +++ b/src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.SAM.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #if __SAM3X8E__ #line 2 "{{EscapeBackSlashes .sketch.MainFile.Name}}" @@ -12,7 +12,7 @@ void f2(); void setup(); #line 14 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void loop(); -#line 2 +#line 2 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void ifBranch() { } #else diff --git a/src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.txt b/src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.txt index 9482b870..88778cd2 100644 --- a/src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.txt +++ b/src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.txt @@ -1,5 +1,5 @@ #include -#line 1 +#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}" #if __SAM3X8E__ void ifBranch() { @@ -15,7 +15,7 @@ void f2(); void setup(); #line 14 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void loop(); -#line 5 +#line 5 "{{EscapeBackSlashes .sketch.MainFile.Name}}" void elseBranch() { } #endif