Skip to content

Commit c51f566

Browse files
C++ standard is now parsed from compiler arguments
1 parent 882f94d commit c51f566

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@
586586
},
587587
"dependencies": {
588588
"body-parser": "^1.16.1",
589-
"cocopa": "0.0.12",
589+
"cocopa": "0.0.13",
590590
"compare-versions": "^3.4.0",
591591
"eventemitter2": "^4.1.0",
592592
"express": "^4.14.1",

src/arduino/intellisense.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ export function isCompilerParserEnabled(dc?: DeviceContext) {
4343
*
4444
* Possible enhancements:
4545
*
46-
* * Parse c++ standard from arduino command line
47-
*
48-
* Arduino currently sets the C++ standard during compilation with the
49-
* flag -std=gnu++11
50-
*
5146
* * Order of includes: Perhaps insert the internal includes at the front
5247
* as at least for the forcedIncludes IntelliSense seems to take the
5348
* order into account.
@@ -91,14 +86,11 @@ export function makeCompilerParserContext(dc: DeviceContext): ICoCoPaContext {
9186
arduinoChannel.warning("Unable to locate \"Arduino.h\" within IntelliSense include paths.");
9287
}
9388

94-
// TODO: check what kind of result we've got: gcc or other architecture:
95-
// and instantiate content accordingly (to be implemented within cocopa)
96-
// -> move result to the parser engine itself
89+
// The C++ standard is set to the following default value if no compiler flag has been found.
9790
const content = new ccp.CCppPropertiesContentResult(runner.result,
9891
constants.C_CPP_PROPERTIES_CONFIG_NAME,
9992
ccp.CCppPropertiesISMode.Gcc_X64,
10093
ccp.CCppPropertiesCStandard.C11,
101-
// as of 1.8.11 arduino is on C++11
10294
ccp.CCppPropertiesCppStandard.Cpp11,
10395
forcedIncludes);
10496
try {
@@ -135,7 +127,6 @@ export function makeCompilerParserContext(dc: DeviceContext): ICoCoPaContext {
135127
* @param dc Current device context used to generate the engines.
136128
*/
137129
function makeCompilerParserEngines(dc: DeviceContext) {
138-
139130
const sketch = path.basename(dc.sketch);
140131
const trigger = ccp.getTriggerForArduinoGcc(sketch);
141132
const gccParserEngine = new ccp.ParserGcc(trigger);

0 commit comments

Comments
 (0)