Skip to content

Commit

Permalink
型パラメーター出力の追加
Browse files Browse the repository at this point in the history
resolved #9
  • Loading branch information
love2hina-net committed Aug 29, 2021
1 parent c3cc064 commit 3e25fe2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/main/powershell/TargetInfo.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class MethodTargetInfo : TargetInfo {
# 定義
[string] $definition

# 型引数
[TypeParameterTargetInfo[]] $typeParameters = @()
# 引数
[ParameterTargetInfo[]] $parameters = @()
# 戻り値
Expand All @@ -97,21 +99,37 @@ class MethodTargetInfo : TargetInfo {
$this.name = $node.Evaluate('@name')
$this.definition = $node.Evaluate('definition/text()')

foreach ($i in $node.Evaluate('typeParameter')) {
$this.typeParameters += [TypeParameterTargetInfo]::new($i)
}
foreach ($i in $node.Evaluate('parameter')) {
$this.parameters += [ParameterTargetInfo]::new($i)
}

foreach ($i in $node.Evaluate('return')) {
$this.return += [ReturnTargetInfo]::new($i)
}

foreach ($i in $node.Evaluate('throws')) {
$this.throws += [ThrowsTargetInfo]::new($i)
}
}

}

class TypeParameterTargetInfo: TargetInfo {

# コメント
[string] $comment
# 型名
[string] $type

TypeParameterTargetInfo([XPathNavigator]$node) : base($node) {

$this.comment = $node.Evaluate('text()')
$this.type = $node.Evaluate('@type')
}

}

class ParameterTargetInfo: TargetInfo {

# コメント
Expand Down
Binary file modified template/test.xlsm
Binary file not shown.

0 comments on commit 3e25fe2

Please sign in to comment.