Skip to content

Commit

Permalink
updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
snehara99 committed Dec 11, 2024
1 parent a123cce commit 73224ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Bug Fixes:

- Ensure that we append line endings, which fixes a recent regression. [#641](https://github.com/microsoft/vscode-makefile-tools/issues/641)
- Ensure we handle parenthesis without their partner correctly. [#543](https://github.com/microsoft/vscode-makefile-tools/issues/543)
- Fix intellisense "unrecognized token" issue with define. [#526](https://github.com/microsoft/vscode-makefile-tools/issues/526)

Improvements:

Expand Down
24 changes: 15 additions & 9 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1213,18 +1213,24 @@ export async function parseCustomConfigProvider(
// and switches that don't affect IntelliSense but are causing errors.
let compilerArgs: string[] = [];
let compilerFragments: string[] = [];

if (useCompilerFragments) {
compilerFragments = await parseAnySwitchFromToolArguments(
compilerTool.arguments,
["I", "FI", "include", "D", "std", "MF"]
);
} else {
compilerArgs = await parseAnySwitchFromToolArguments(
compilerTool.arguments,
["I", "FI", "include", "D", "std", "MF"]
);
// This is a temporary solution where we are only using compiler fragments here to pass the
// -D defines to the compiler (to fix intellisense issues). We still separately parse defines.
// There is still an issue tracking using compilerFragments fully instead of compilerArgs:
// https://github.com/microsoft/vscode-makefile-tools/issues/352.
let tempFragments: string[] = compilerTool.arguments.trim().split(" -D");
if (tempFragments.length > 1) {
for (let i: number = 1; i < tempFragments.length; i++) {
compilerFragments.push("-D" + tempFragments[i].trim().split("/\s+/")[0]);
}
}
}

compilerArgs = await parseAnySwitchFromToolArguments(
compilerTool.arguments,
["I", "FI", "include", "D", "std", "MF"]
);

// Parse and log the includes, forced includes and the defines
let includes: string[] = parseMultipleSwitchFromToolArguments(
Expand Down

0 comments on commit 73224ed

Please sign in to comment.