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
8df1e67f
Commit
8df1e67f
authored
Sep 09, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typedef traversal only marks interfaces as such
parent
677d1109
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
src/Convert/Typedef.hs
+3
-1
No files found.
src/Convert/Typedef.hs
View file @
8df1e67f
...
@@ -25,6 +25,8 @@ convert =
...
@@ -25,6 +25,8 @@ convert =
where
where
getTypedef
::
Description
->
Writer
Types
()
getTypedef
::
Description
->
Writer
Types
()
getTypedef
(
PackageItem
(
Typedef
a
b
))
=
tell
$
Map
.
singleton
b
a
getTypedef
(
PackageItem
(
Typedef
a
b
))
=
tell
$
Map
.
singleton
b
a
getTypedef
(
Part
_
Interface
_
x
_
_
)
=
tell
$
Map
.
singleton
x
(
InterfaceT
x
Nothing
[]
)
getTypedef
_
=
return
()
getTypedef
_
=
return
()
removeTypedef
::
Description
->
Description
removeTypedef
::
Description
->
Description
removeTypedef
(
PackageItem
(
Typedef
_
x
))
=
removeTypedef
(
PackageItem
(
Typedef
_
x
))
=
...
@@ -71,7 +73,7 @@ resolveType types (Struct p items rs) = Struct p (map (resolveItem types) items)
...
@@ -71,7 +73,7 @@ resolveType types (Struct p items rs) = Struct p (map (resolveItem types) items)
resolveType
types
(
Union
p
items
rs
)
=
Union
p
(
map
(
resolveItem
types
)
items
)
rs
resolveType
types
(
Union
p
items
rs
)
=
Union
p
(
map
(
resolveItem
types
)
items
)
rs
resolveType
types
(
Alias
Nothing
st
rs1
)
=
resolveType
types
(
Alias
Nothing
st
rs1
)
=
if
Map
.
notMember
st
types
if
Map
.
notMember
st
types
then
InterfaceT
st
Nothing
rs1
then
Alias
Nothing
st
rs1
else
case
resolveType
types
$
types
Map
.!
st
of
else
case
resolveType
types
$
types
Map
.!
st
of
(
Net
kw
rs2
)
->
Net
kw
$
rs1
++
rs2
(
Net
kw
rs2
)
->
Net
kw
$
rs1
++
rs2
(
Implicit
sg
rs2
)
->
Implicit
sg
$
rs1
++
rs2
(
Implicit
sg
rs2
)
->
Implicit
sg
$
rs1
++
rs2
...
...
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