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
ed816ac5
Commit
ed816ac5
authored
Mar 25, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix silly bugs from AST reorg
parent
8907ac86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/Language/SystemVerilog/AST/Expr.hs
+1
-1
src/Language/SystemVerilog/AST/Stmt.hs
+4
-4
No files found.
src/Language/SystemVerilog/AST/Expr.hs
View file @
ed816ac5
...
...
@@ -47,7 +47,7 @@ instance Show Expr where
show
(
Repeat
e
l
)
=
printf
"{%s {%s}}"
(
show
e
)
(
commas
$
map
show
l
)
show
(
Concat
l
)
=
printf
"{%s}"
(
commas
$
map
show
l
)
show
(
UniOp
a
b
)
=
printf
"(%s %s)"
(
show
a
)
(
show
b
)
show
(
BinOp
a
o
b
)
=
printf
"(%s %s %s)"
(
show
a
)
(
show
o
)
(
show
b
)
show
(
BinOp
o
a
b
)
=
printf
"(%s %s %s)"
(
show
a
)
(
show
o
)
(
show
b
)
show
(
Cast
t
e
)
=
printf
"%s'(%s)"
(
show
t
)
(
show
e
)
show
(
Dot
e
n
)
=
printf
"%s.%s"
(
show
e
)
n
show
(
Mux
c
a
b
)
=
printf
"(%s ? %s : %s)"
(
show
c
)
(
show
a
)
(
show
b
)
...
...
src/Language/SystemVerilog/AST/Stmt.hs
View file @
ed816ac5
...
...
@@ -41,11 +41,11 @@ data Stmt
instance
Show
Stmt
where
show
(
Block
name
decls
stmts
)
=
printf
"begin%s
\n
%s
\n
%s
\n
end"
header
(
block
decls
)
(
block
stmts
)
printf
"begin%s
\n
%s
\n
end"
header
body
where
header
=
maybe
""
(
" : "
++
)
name
b
lock
::
Show
t
=>
[
t
]
->
String
b
lock
=
indent
.
unlines'
.
map
show
b
odyLines
=
(
map
show
decls
)
++
(
map
show
stmts
)
b
ody
=
indent
$
unlines'
bodyLines
show
(
Case
u
kw
e
cs
def
)
=
printf
"%s%s (%s)
\n
%s%s
\n
endcase"
uniqStr
(
show
kw
)
(
show
e
)
bodyStr
defStr
where
...
...
@@ -66,7 +66,7 @@ instance Show Stmt where
show
(
If
a
b
Null
)
=
printf
"if (%s) %s"
(
show
a
)
(
show
b
)
show
(
If
a
b
c
)
=
printf
"if (%s) %s
\n
else %s"
(
show
a
)
(
show
b
)
(
show
c
)
show
(
Return
e
)
=
printf
"return %s;"
(
show
e
)
show
(
Timing
t
s
)
=
printf
"%s%s"
(
show
t
)
(
show
s
)
show
(
Timing
t
s
)
=
printf
"%s
%s"
(
show
t
)
(
show
s
)
show
(
Null
)
=
";"
data
CaseKW
...
...
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