Skip to content

Commit

Permalink
Merge pull request #116 from kasecato/#113/arrayParams
Browse files Browse the repository at this point in the history
#113/array params
  • Loading branch information
kasecato authored Nov 14, 2020
2 parents f0dc311 + 79c2794 commit 1277cb9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Change Log

## 0.1.19 (Nov 14, 2020)

* bug fix - Type is detected as parameter. See [#113](https://github.com/kasecato/vscode-docomment/issues/113).
* upgrade libs

## 0.1.18 (Aug 12, 2020)

* enhancement - add support for Blazor .razor files. See [#110](https://github.com/kasecato/vscode-docomment/issues/110)
* enhancement - add support for Blazor .razor files. See [#110](https://github.com/kasecato/vscode-docomment/issues/110).
* upgrade libs

## 0.1.17 (July 28, 2020)
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Lang/DocommentDomainCSharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class DocommentDomainCSharp extends DocommentDomain {
case CodeType.Method:
genericList = SyntacticAnalysisCSharp.GetGenericMethodsList(code);
paramNameList = SyntacticAnalysisCSharp.GetMethodParamNameList(code);
hasReturn = SyntacticAnalysisCSharp.HasMethodReturn(code);
hasReturn = SyntacticAnalysisCSharp.HasMethodReturn(code);
break;
case CodeType.Field:
break;
Expand Down
3 changes: 2 additions & 1 deletion src/SyntacticAnalysis/SyntacticAnalysisCSharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ export class SyntacticAnalysisCSharp {
const removedAttrCode: string = code.replace(/^\s*\[.+?\]/, ''); // FIXME:
const removedExtendsCode: string = removedAttrCode.replace(/:.+/, ''); // FIXME:
const removedLamdaCode: string = removedExtendsCode.replace(/=>.*/, ''); // FIXME:
const params: RegExpMatchArray = removedLamdaCode.match(/.+\(([^)]*)\)/);
const removedArrayCode: string = removedLamdaCode.replace(/\[.*?\]/g, ''); // FIXME:
const params: RegExpMatchArray = removedArrayCode.match(/.+\(([^)]*)\)/);

const isMatched = (params === null || params.length !== 2);
if (isMatched) return null;
Expand Down
2 changes: 2 additions & 0 deletions test/TestData/X.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ public static (object result, string name) ComplexFunctionSignatureTwo() { }
public bool Has(IList<int> a, int b) => a.Any(x => x == b);
public bool DoesntHas(IList<int> a, int b) => a.Any(x => x != b);
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) { }
}

namespace ns {
Expand Down

0 comments on commit 1277cb9

Please sign in to comment.