Skip to content

Commit

Permalink
Merge pull request #117 from kasecato/#115/innerTupple
Browse files Browse the repository at this point in the history
Fixed #115 that is detected the inner tuple as parameter
  • Loading branch information
kasecato authored Nov 14, 2020
2 parents 1277cb9 + 64450d9 commit eab97cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.1.19 (Nov 14, 2020)

* bug fix - Type is detected as parameter. See [#113](https://github.com/kasecato/vscode-docomment/issues/113).
* bug fix - Generates param tags for inner tuple type instead of method parameters. See [#115](https://github.com/kasecato/vscode-docomment/issues/115).
* upgrade libs

## 0.1.18 (Aug 12, 2020)
Expand Down
2 changes: 1 addition & 1 deletion src/SyntacticAnalysis/SyntacticAnalysisCSharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class SyntacticAnalysisCSharp {
const removedExtendsCode: string = removedAttrCode.replace(/:.+/, ''); // FIXME:
const removedLamdaCode: string = removedExtendsCode.replace(/=>.*/, ''); // FIXME:
const removedArrayCode: string = removedLamdaCode.replace(/\[.*?\]/g, ''); // FIXME:
const params: RegExpMatchArray = removedArrayCode.match(/.+\(([^)]*)\)/);
const params: RegExpMatchArray = removedArrayCode.match(/\((.+)\)/s);

const isMatched = (params === null || params.length !== 2);
if (isMatched) return null;
Expand Down
8 changes: 8 additions & 0 deletions test/TestData/X.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ public static (object result, string name) ComplexFunctionSignatureTwo() { }
public IEnumerable<int> ZipAdd(IList<int> a, IList<int> b) => a.Zip(b, (s, t) => s + t);

private void CSVStringToIntArray( ref string[] pCSVData, ref int[,] pZone) { }

bool ArgsValid(
string commandName,
IReadOnlyList<string> requiredArgs,
int length,
IReadOnlyList<(string name, string value)> namedArgs,
IReadOnlyList<string> argNames
) { }
}

namespace ns {
Expand Down

0 comments on commit eab97cb

Please sign in to comment.