Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
ecaaec9c
Commit
ecaaec9c
authored
Jun 04, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor codegen cleanup
parent
d2a18e01
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
src/Language/SystemVerilog/AST/Expr.hs
+5
-6
src/Language/SystemVerilog/AST/ShowHelp.hs
+1
-1
No files found.
src/Language/SystemVerilog/AST/Expr.hs
View file @
ecaaec9c
...
...
@@ -126,7 +126,7 @@ data Args
deriving
(
Eq
,
Ord
)
instance
Show
Args
where
show
(
Args
pnArgs
kwArgs
)
=
"("
++
(
commas
strs
)
++
")"
show
(
Args
pnArgs
kwArgs
)
=
'('
:
commas
strs
++
")"
where
strs
=
(
map
show
pnArgs
)
++
(
map
showKwArg
kwArgs
)
showKwArg
(
x
,
e
)
=
printf
".%s(%s)"
x
(
show
e
)
...
...
@@ -177,10 +177,10 @@ showAssignment val = " = " ++ show val
showRanges
::
[
Range
]
->
String
showRanges
[]
=
""
showRanges
l
=
" "
++
(
concatMap
showRange
l
)
showRanges
l
=
' '
:
concatMap
showRange
l
showRange
::
Range
->
String
showRange
(
h
,
l
)
=
printf
"[%s:%s]"
(
show
h
)
(
show
l
)
showRange
(
h
,
l
)
=
'['
:
show
h
++
':'
:
show
l
++
"]"
showUniOpPrec
::
Expr
->
ShowS
showUniOpPrec
(
e
@
UniOp
{})
=
(
showParen
True
.
shows
)
e
...
...
@@ -198,6 +198,5 @@ showParams params = indentedParenList $ map showParam params
showParam
::
ParamBinding
->
String
showParam
(
"*"
,
Right
Nil
)
=
".*"
showParam
(
i
,
arg
)
=
printf
fmt
i
(
either
show
show
arg
)
where
fmt
=
if
i
==
""
then
"%s%s"
else
".%s(%s)"
showParam
(
""
,
arg
)
=
showEither
arg
showParam
(
i
,
arg
)
=
printf
".%s(%s)"
i
(
showEither
arg
)
src/Language/SystemVerilog/AST/ShowHelp.hs
View file @
ecaaec9c
...
...
@@ -57,4 +57,4 @@ showEither (Right v) = show v
showBlock
::
(
Show
a
,
Show
b
)
=>
[
a
]
->
[
b
]
->
String
showBlock
a
[]
=
indent
$
show
a
showBlock
[]
b
=
indent
$
show
b
showBlock
a
b
=
indent
$
show
a
++
"
\n
"
++
show
b
showBlock
a
b
=
indent
$
show
a
++
'
\n
'
:
show
b
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment