Skip to content

Commit 071d4b7

Browse files
committed
Merge branch 'line-directives' of git://github.com/facchinm/arduino-builder
Signed-off-by: Cristian Maglie <[email protected]>
2 parents cbe79c0 + 8e68b65 commit 071d4b7

13 files changed

+50
-43
lines changed

Diff for: src/arduino.cc/builder/prototypes_adder.go

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ func composePrototypeSection(line int, prototypes []*types.Prototype) string {
9292
str := joinPrototypes(prototypes)
9393
str += "\n#line "
9494
str += strconv.Itoa(line)
95+
str += " \"" + prototypes[0].File + "\""
9596
str += "\n"
9697

9798
return str

Diff for: src/arduino.cc/builder/sketch_source_merger.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (s *SketchSourceMerger) Run(context map[string]interface{}) error {
4848
includeSection += "#include <Arduino.h>\n"
4949
lineOffset++
5050
}
51-
includeSection += "#line 1\n"
51+
includeSection += "#line 1 \"" + strings.Replace((&sketch.MainFile).Name, "\\", "\\\\", -1) + "\"\n"
5252
lineOffset++
5353
context[constants.CTX_INCLUDE_SECTION] = includeSection
5454

Diff for: src/arduino.cc/builder/test/prototypes_adder_test.go

+28-22
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ func TestPrototypesAdderBridgeExample(t *testing.T) {
8282
NoError(t, err)
8383
}
8484

85-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
86-
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))
85+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
86+
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))
8787
}
8888

8989
func TestPrototypesAdderSketchWithIfDef(t *testing.T) {
@@ -418,8 +418,8 @@ func TestPrototypesAdderSketchWithConfig(t *testing.T) {
418418
NoError(t, err)
419419
}
420420

421-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
422-
require.Equal(t, "#line 13 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 17 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 13\n", context[constants.CTX_PROTOTYPE_SECTION].(string))
421+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
422+
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))
423423

424424
preprocessed := LoadAndInterpolate(t, filepath.Join("sketch_with_config", "sketch_with_config.preprocessed.txt"), context)
425425
require.Equal(t, preprocessed, strings.Replace(context[constants.CTX_SOURCE].(string), "\r\n", "\n", -1))
@@ -433,6 +433,9 @@ func TestPrototypesAdderSketchNoFunctionsTwoFiles(t *testing.T) {
433433
buildPath := SetupBuildPath(t, context)
434434
defer os.RemoveAll(buildPath)
435435

436+
sketchLocation := filepath.Join("sketch_no_functions_two_files", "main.ino")
437+
absoluteSketchLocation := strings.Replace(Abs(t, sketchLocation), "\\", "\\\\", -1)
438+
436439
context[constants.CTX_HARDWARE_FOLDERS] = []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}
437440
context[constants.CTX_TOOLS_FOLDERS] = []string{"downloaded_tools"}
438441
context[constants.CTX_FQBN] = "arduino:avr:leonardo"
@@ -462,7 +465,7 @@ func TestPrototypesAdderSketchNoFunctionsTwoFiles(t *testing.T) {
462465
NoError(t, err)
463466
}
464467

465-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
468+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
466469
require.Nil(t, context[constants.CTX_PROTOTYPE_SECTION])
467470
}
468471

@@ -474,6 +477,9 @@ func TestPrototypesAdderSketchNoFunctions(t *testing.T) {
474477
buildPath := SetupBuildPath(t, context)
475478
defer os.RemoveAll(buildPath)
476479

480+
sketchLocation := filepath.Join("sketch_no_functions", "main.ino")
481+
absoluteSketchLocation := strings.Replace(Abs(t, sketchLocation), "\\", "\\\\", -1)
482+
477483
context[constants.CTX_HARDWARE_FOLDERS] = []string{filepath.Join("..", "hardware"), "hardware", "downloaded_hardware"}
478484
context[constants.CTX_TOOLS_FOLDERS] = []string{"downloaded_tools"}
479485
context[constants.CTX_FQBN] = "arduino:avr:leonardo"
@@ -503,7 +509,7 @@ func TestPrototypesAdderSketchNoFunctions(t *testing.T) {
503509
NoError(t, err)
504510
}
505511

506-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
512+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
507513
require.Nil(t, context[constants.CTX_PROTOTYPE_SECTION])
508514
}
509515

@@ -547,8 +553,8 @@ func TestPrototypesAdderSketchWithDefaultArgs(t *testing.T) {
547553
NoError(t, err)
548554
}
549555

550-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
551-
require.Equal(t, "#line 4 \""+absoluteSketchLocation+"\"\nvoid setup();\n#line 7 \""+absoluteSketchLocation+"\"\nvoid loop();\n#line 1\n", context[constants.CTX_PROTOTYPE_SECTION].(string))
556+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
557+
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))
552558
}
553559

554560
func TestPrototypesAdderSketchWithInlineFunction(t *testing.T) {
@@ -591,9 +597,9 @@ func TestPrototypesAdderSketchWithInlineFunction(t *testing.T) {
591597
NoError(t, err)
592598
}
593599

594-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
600+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
595601

596-
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"
602+
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"
597603
obtained := context[constants.CTX_PROTOTYPE_SECTION].(string)
598604
// ctags based preprocessing removes "inline" but this is still OK
599605
// TODO: remove this exception when moving to a more powerful parser
@@ -646,8 +652,8 @@ func TestPrototypesAdderSketchWithFunctionSignatureInsideIFDEF(t *testing.T) {
646652
NoError(t, err)
647653
}
648654

649-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
650-
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))
655+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
656+
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))
651657
}
652658

653659
func TestPrototypesAdderSketchWithUSBCON(t *testing.T) {
@@ -690,8 +696,8 @@ func TestPrototypesAdderSketchWithUSBCON(t *testing.T) {
690696
NoError(t, err)
691697
}
692698

693-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
694-
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))
699+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
700+
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))
695701
}
696702

697703
func TestPrototypesAdderSketchWithTypename(t *testing.T) {
@@ -733,8 +739,8 @@ func TestPrototypesAdderSketchWithTypename(t *testing.T) {
733739
NoError(t, err)
734740
}
735741

736-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
737-
expected := "#line 6 \"" + absoluteSketchLocation + "\"\nvoid setup();\n#line 10 \"" + absoluteSketchLocation + "\"\nvoid loop();\n#line 12 \"" + absoluteSketchLocation + "\"\ntypename Foo<char>::Bar func();\n#line 6\n"
742+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
743+
expected := "#line 6 \"" + absoluteSketchLocation + "\"\nvoid setup();\n#line 10 \"" + absoluteSketchLocation + "\"\nvoid loop();\n#line 12 \"" + absoluteSketchLocation + "\"\ntypename Foo<char>::Bar func();\n#line 6 \"" + absoluteSketchLocation + "\"\n"
738744
obtained := context[constants.CTX_PROTOTYPE_SECTION].(string)
739745
// ctags based preprocessing ignores line with typename
740746
// TODO: remove this exception when moving to a more powerful parser
@@ -783,8 +789,8 @@ func TestPrototypesAdderSketchWithIfDef2(t *testing.T) {
783789
NoError(t, err)
784790
}
785791

786-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
787-
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))
792+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
793+
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))
788794

789795
expectedSource := LoadAndInterpolate(t, filepath.Join("sketch_with_ifdef", "sketch.preprocessed.txt"), context)
790796
require.Equal(t, expectedSource, strings.Replace(context[constants.CTX_SOURCE].(string), "\r\n", "\n", -1))
@@ -830,8 +836,8 @@ func TestPrototypesAdderSketchWithIfDef2SAM(t *testing.T) {
830836
NoError(t, err)
831837
}
832838

833-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
834-
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))
839+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
840+
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))
835841

836842
expectedSource := LoadAndInterpolate(t, filepath.Join("sketch_with_ifdef", "sketch.preprocessed.SAM.txt"), context)
837843
require.Equal(t, expectedSource, strings.Replace(context[constants.CTX_SOURCE].(string), "\r\n", "\n", -1))
@@ -877,8 +883,8 @@ func TestPrototypesAdderSketchWithConst(t *testing.T) {
877883
NoError(t, err)
878884
}
879885

880-
require.Equal(t, "#include <Arduino.h>\n#line 1\n", context[constants.CTX_INCLUDE_SECTION].(string))
881-
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))
886+
require.Equal(t, "#include <Arduino.h>\n#line 1 \""+absoluteSketchLocation+"\"\n", context[constants.CTX_INCLUDE_SECTION].(string))
887+
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))
882888
}
883889

884890
func TestPrototypesAdderSketchWithDosEol(t *testing.T) {

Diff for: src/arduino.cc/builder/test/sketch2/SketchWithIfDef.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
#define DEBUG 1
55
#define DISABLED 0
@@ -26,7 +26,7 @@ void debug();
2626
void disabledIsDefined();
2727
#line 48 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
2828
int useMyType(MyType type);
29-
#line 16
29+
#line 16 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
3030
void setup() {
3131
// put your setup code here, to run once:
3232

Diff for: src/arduino.cc/builder/test/sketch3/Baladuino.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
/*
55
* 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
9292
void setup();
9393
#line 204 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
9494
void loop();
95-
#line 88
95+
#line 88 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
9696
void setup() {
9797
/* Initialize UART */
9898
Serial.begin(115200);

Diff for: src/arduino.cc/builder/test/sketch4/CharWithEscapedDoubleQuote.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
#include <SoftwareSerial.h> // required to send and receive AT commands from the GPRS Shield
55
#include <Wire.h> // required for I2C communication with the RTC
@@ -81,7 +81,7 @@ void printTime();
8181
void setup();
8282
#line 334 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
8383
void loop();
84-
#line 39
84+
#line 39 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
8585
void setPowerStateTo( int newState )
8686
{
8787
if( newState != 1 && newState != 0 ) { // tests for an invalid state. In this case no change is made to powerstate

Diff for: src/arduino.cc/builder/test/sketch5/IncludeBetweenMultilineComment.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
#include <CapacitiveSensor.h>
55
/*
@@ -10,7 +10,7 @@ CapacitiveSensor cs_13_8 = CapacitiveSensor(13,8);
1010
void setup();
1111
#line 10 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1212
void loop();
13-
#line 6
13+
#line 6 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1414
void setup()
1515
{
1616
Serial.begin(9600);

Diff for: src/arduino.cc/builder/test/sketch6/LineContinuations.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
const char *foo = "\
55
hello \
@@ -11,7 +11,7 @@ world\n";
1111
void setup();
1212
#line 11 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1313
void loop();
14-
#line 7
14+
#line 7 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1515
void setup()
1616
{
1717
}

Diff for: src/arduino.cc/builder/test/sketch7/StringWithComment.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
55
void setup();
66
#line 10 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
77
void loop();
8-
#line 1
8+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
99
void setup() {
1010
// put your setup code here, to run once:
1111
// "comment with a double quote

Diff for: src/arduino.cc/builder/test/sketch8/SketchWithStruct.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
/* START CODE */
55

@@ -15,7 +15,7 @@ void setup();
1515
void loop();
1616
#line 17 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1717
void dostuff (A_NEW_TYPE * bar);
18-
#line 9
18+
#line 9 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1919
void setup() {
2020

2121
}

Diff for: src/arduino.cc/builder/test/sketch_with_config/sketch_with_config.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
#include "config.h"
55

@@ -17,7 +17,7 @@
1717
void setup();
1818
#line 17 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1919
void loop();
20-
#line 13
20+
#line 13 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
2121
void setup() {
2222

2323
}

Diff for: src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.SAM.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
#if __SAM3X8E__
55
#line 2 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
@@ -12,7 +12,7 @@ void f2();
1212
void setup();
1313
#line 14 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1414
void loop();
15-
#line 2
15+
#line 2 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1616
void ifBranch() {
1717
}
1818
#else

Diff for: src/arduino.cc/builder/test/sketch_with_ifdef/sketch.preprocessed.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <Arduino.h>
2-
#line 1
2+
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
33
#line 1 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
44
#if __SAM3X8E__
55
void ifBranch() {
@@ -15,7 +15,7 @@ void f2();
1515
void setup();
1616
#line 14 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1717
void loop();
18-
#line 5
18+
#line 5 "{{EscapeBackSlashes .sketch.MainFile.Name}}"
1919
void elseBranch() {
2020
}
2121
#endif

0 commit comments

Comments
 (0)