File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -804,16 +804,25 @@ Please make sure the folder is not occupied by other procedures .`);
804
804
callback : undefined ,
805
805
conclude : undefined ,
806
806
}
807
- } ;
808
-
807
+ } ;
808
+ /**
809
+ *
810
+ * @param dc
811
+ */
809
812
private makeCompilerParserEngines ( dc : DeviceContext ) {
813
+
814
+ let sketch = path . basename ( dc . sketch ) ;
815
+ const dotcpp = sketch . endsWith ( ".ino" ) ? ".cpp" : "" ;
816
+ sketch = `-o\\s+\\S*${ ccp . regExEscape ( sketch ) } ${ dotcpp } \\.o` ;
817
+
810
818
const matchPattern = [
811
819
// trigger parser when compiling the main sketch
812
- ` ${ path . basename ( dc . sketch ) } .cpp.o` ,
820
+ RegExp ( sketch ) ,
813
821
] ;
822
+
814
823
const dontMatchPattern = [
815
824
// make sure Arduino's not testing libraries
816
- / - o \s \/ d e v \/ n u l l / ,
825
+ / - o \s + \/ d e v \/ n u l l / ,
817
826
] ;
818
827
819
828
// setup the parser with its engines
You can’t perform that action at this time.
0 commit comments