diff options
author | Patrick Lehmann <Patrick.Lehmann@tu-dresden.de> | 2016-11-10 02:03:46 +0100 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@tu-dresden.de> | 2016-11-10 02:03:46 +0100 |
commit | dca4e8536584216f915550ec7ec4efa10ec92ab9 (patch) | |
tree | 83d0c41f5aab447b7b76ff0b231f232aa72316bf /dist | |
parent | 34e5a9ee00d04b8c48935b0142f3817ba9f65ea0 (diff) | |
download | ghdl-dca4e8536584216f915550ec7ec4efa10ec92ab9.tar.gz ghdl-dca4e8536584216f915550ec7ec4efa10ec92ab9.tar.bz2 ghdl-dca4e8536584216f915550ec7ec4efa10ec92ab9.zip |
Reactivated missing SuppressWarnings flag again. Filter for ":error:" marked lines.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/mcode/windows/shared.psm1 | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/dist/mcode/windows/shared.psm1 b/dist/mcode/windows/shared.psm1 index d888b1059..20aa5d7da 100644 --- a/dist/mcode/windows/shared.psm1 +++ b/dist/mcode/windows/shared.psm1 @@ -106,20 +106,20 @@ function Format-VHDLSourceFile ) begin - { $State = 1 - $Version = switch ($Version) - { "87" { 87 } - "93" { 93 } - "02" { 2 } - "08" { 8 } - } + { $State = 0 + $VersionAsInt = switch ($Version) + { "87" { 87 } + "93" { 93 } + "02" { 2 } + "08" { 8 } + } } process { if ($InputObject -is [String]) { $Line = $InputObject.ToString() if ($Line.StartsWith("--START-V")) - { $State = switch ($Line.Substring(9, 2)) + { $State = switch ($Line.Substring(9, 2)) { "87" { 87 } "93" { 93 } "02" { 2 } @@ -128,19 +128,21 @@ function Format-VHDLSourceFile } elseif ($Line.StartsWith("--START-!V")) { if ($Line.Substring(10, 2) -eq $Version) - { $State = 2 } + { $State = -1 } } elseif ($Line.StartsWith("--END-V") -or $Line.StartsWith("--END-!V")) - { $State = 1 } + { $State = 0 } else - { if ($State -eq 1) + { if ($State -eq 0) { if ($Line.EndsWith("--V$Version")) { Write-Output $Line } elseif (-not (($Line -like "*--V??") -or ($Line.EndsWith("--!V$Version")))) { Write-Output $Line } } - elseif ($State -eq $Version) + elseif ($State -eq $VersionAsInt) { Write-Output $Line } + # else + # { Write-Host "Discard line: $Line" -ForegroundColor Red } } } else |