Skip to content

Commit

Permalink
Merge pull request #20 from k--kato/#19
Browse files Browse the repository at this point in the history
fixed Adds extra param for `Func<T, bool>` #19
  • Loading branch information
Keisuke KATO authored Dec 1, 2016
2 parents 73cb331 + bef8054 commit 39acaaf
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ os:
- osx
- linux

cache:
bundler: true
directories:
- node_modules # NPM packages

before_install:
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Change Log

## 0.0.8 (December 2, 2016)

* bug fix - Adds extra param for `Func<T, bool>`. See [#19](https://github.com/k--kato/vscode-docomment/issues/19).

## 0.0.7 (July 11, 2016)

## 0.0.6 (Jun 24, 2016)

## 0.0.5 (April 2, 2016)

## 0.0.4 (February 7, 2016)

## 0.0.3 (January 24, 2016)

## 0.0.2 (January 14, 2016)

## 0.0.1 (January 4, 2016)
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "docomment",
"version": "0.0.7",
"version": "0.0.8",
"publisher": "k--kato",
"engines": {
"vscode": "^1.3.x"
"vscode": "^1.7.x"
},
"displayName": "C# XML Documentation Comments",
"description": "Generate C# XML documentation comments for ///",
Expand Down Expand Up @@ -45,20 +45,22 @@
"dependencies": {
},
"devDependencies": {
"typescript": "^1.8.10",
"vscode": "^0.11.14",
"tslint": "^3.13.0",
"istanbul": "^0.4.4",
"coveralls": "^2.11.9",
"mocha": "^2.5.3",
"mocha-lcov-reporter": "^1.2.0"
"typescript": "^2.0.10",
"vscode": "^1.0.3",
"tslint": "^4.0.2",
"istanbul": "^0.4.5",
"coveralls": "^2.11.15",
"mocha": "^3.2.0",
"mocha-lcov-reporter": "^1.2.0",
"@types/node": "^6.0.40",
"@types/mocha": "^2.2.33"
},
"extensionDependencies": [
],
"isAMD": false,
"scripts": {
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
"compile": "node ./node_modules/vscode/bin/compile -p ./",
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -watch -p ./",
"watch": "node ./node_modules/vscode/bin/compile -watch -p ./",
"test": "node ./node_modules/vscode/bin/test",
"coverage_travis": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec --ui tdd ./out/test/**/*.js",
Expand Down
17 changes: 13 additions & 4 deletions src/SyntacticAnalysis/SyntacticAnalysisCSharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,19 @@ export class SyntacticAnalysisCSharp {

let paramName: Array<string> = new Array<string>();
params[1].split(',').forEach(param => {
const hasOptionaParam: boolean = param.match(/\S+\s+\S+\s*=/) !== null;
const name: RegExpMatchArray = (hasOptionaParam)
? param.match(/\S+\s+(\S+)\s*=.*/)
: param.match(/(\S+)\s*$/);
const hasOptionalParam: boolean = param.match(/\S+\s+\S+\s*=/) !== null;
const hasGenericParam: boolean = param.match(/[<]/) !== null;
const hasTypeInfo: boolean = param.match(/[\w\W]+\s+[\w\W]+/) !== null;
let name: RegExpMatchArray = null;
if (hasOptionalParam) {
name = param.match(/\S+\s+(\S+)\s*=.*/);
} else if (hasGenericParam) {
name = null; // SKIP
} else if (!hasTypeInfo) {
name = null; // SKIP
} else {
name = param.match(/(\S+)\s*$/);
}
if (name !== null && name.length === 2) {
paramName.push(name[1]);
}
Expand Down
2 changes: 2 additions & 0 deletions test/TestData/X.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ public class Nested{} // "T:N.X.Nested"
[Route("{time}/{location}")]
[HttpGet]
public async Task<string> GetInfoForTime(string location, double time)
public Collection<T> Filter(Func<T, bool> query) { }
public Collection<T> Filter(Func<T, bool> queryFirst, Func<T, U, V> querySecond) { }
}
}
9 changes: 6 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"target": "es6",
"outDir": "out",
"noLib": true,
"lib": [
"es6"
],
"sourceMap": true
},
"exclude": [
"node_modules"
"node_modules",
".vscode-test"
]
}
1 change: 0 additions & 1 deletion typings/node.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion typings/vscode-typings.d.ts

This file was deleted.

0 comments on commit 39acaaf

Please sign in to comment.