File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,10 @@ func PreprocessSketchWithCtags(ctx *types.Context) error {
63
63
if src , err := targetFilePath .ReadFile (); err != nil {
64
64
return err
65
65
} else {
66
- ctx .SketchSourceAfterCppPreprocessing = filterSketchSource (ctx .Sketch , bytes .NewReader (src ), false )
67
- }
68
-
69
- if err := targetFilePath .WriteFile ([]byte (ctx .SketchSourceAfterCppPreprocessing )); err != nil {
70
- return err
66
+ filteredSource := filterSketchSource (ctx .Sketch , bytes .NewReader (src ), false )
67
+ if err := targetFilePath .WriteFile ([]byte (filteredSource )); err != nil {
68
+ return err
69
+ }
71
70
}
72
71
73
72
sketchCpp := ctx .SketchBuildPath .Join (fmt .Sprintf ("%s.cpp" , ctx .Sketch .MainFile .Base ()))
Original file line number Diff line number Diff line change @@ -104,8 +104,6 @@ type Context struct {
104
104
// Arduino sketch (.ino) to C++ (.cpp) conversion steps:
105
105
// 1. Concatenate *.ino files into a single merged source file -> SketchSourceMerged
106
106
SketchSourceMerged string
107
- // 2. Run a pass of C++ preprocessor to remove macro definitions and ifdef-ed code -> SketchSourceAfterCppPreprocessing
108
- SketchSourceAfterCppPreprocessing string
109
107
// 3. Do the Arduino preprocessing of the sketch (add missing prototypes) -> SketchSourceAfterArduinoPreprocessing
110
108
SketchSourceAfterArduinoPreprocessing string
111
109
You can’t perform that action at this time.
0 commit comments