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
8d77856b
Commit
8d77856b
authored
Apr 17, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StmtLHS traversal includes LHSs for loop parts
parent
07b64bd1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/Convert/Traverse.hs
+11
-0
No files found.
src/Convert/Traverse.hs
View file @
8d77856b
...
...
@@ -332,6 +332,17 @@ traverseStmtLHSsM mapper = stmtMapper
return
$
Asgn
(
Just
$
Event
sense'
)
lhs'
expr
stmtMapper
(
AsgnBlk
op
lhs
expr
)
=
fullMapper
lhs
>>=
\
lhs'
->
return
$
AsgnBlk
op
lhs'
expr
stmtMapper
(
Asgn
mt
lhs
expr
)
=
fullMapper
lhs
>>=
\
lhs'
->
return
$
Asgn
mt
lhs'
expr
stmtMapper
(
For
inits
me
incrs
stmt
)
=
do
inits'
<-
mapM
mapInit
inits
let
(
lhss
,
asgnOps
,
exprs
)
=
unzip3
incrs
lhss'
<-
mapM
fullMapper
lhss
let
incrs'
=
zip3
lhss'
asgnOps
exprs
return
$
For
inits'
me
incrs'
stmt
where
mapInit
(
Left
decl
)
=
return
$
Left
decl
mapInit
(
Right
(
lhs
,
expr
))
=
do
lhs'
<-
fullMapper
lhs
return
$
Right
(
lhs'
,
expr
)
stmtMapper
(
Assertion
a
)
=
assertionMapper
a
>>=
return
.
Assertion
stmtMapper
other
=
return
other
...
...
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