Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
sac-group
sac2c
Commits
ba630709
Commit
ba630709
authored
May 04, 2021
by
Reg Huijben
Browse files
resolve symbol-types for struct elements
parent
3aab2c6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
src/libsac2c/typecheck/resolvesymboltypes.c
src/libsac2c/typecheck/resolvesymboltypes.c
+13
-0
src/libsac2c/typecheck/resolvesymboltypes.h
src/libsac2c/typecheck/resolvesymboltypes.h
+1
-0
src/libsac2c/xml/ast.xml
src/libsac2c/xml/ast.xml
+1
-0
No files found.
src/libsac2c/typecheck/resolvesymboltypes.c
View file @
ba630709
...
...
@@ -117,6 +117,10 @@ RSTmodule (node *arg_node, info *arg_info)
MODULE_FUNS
(
arg_node
)
=
TRAVdo
(
MODULE_FUNS
(
arg_node
),
arg_info
);
}
if
(
MODULE_STRUCTS
(
arg_node
)
!=
NULL
)
{
MODULE_STRUCTS
(
arg_node
)
=
TRAVdo
(
MODULE_STRUCTS
(
arg_node
),
arg_info
);
}
DBUG_RETURN
(
arg_node
);
}
...
...
@@ -361,6 +365,15 @@ RSTtype (node *arg_node, info *arg_info)
DBUG_RETURN
(
arg_node
);
}
node
*
RSTstructelem
(
node
*
arg_node
,
info
*
arg_info
){
DBUG_ENTER
();
STRUCTELEM_TYPE
(
arg_node
)
=
RSTntype
(
STRUCTELEM_TYPE
(
arg_node
),
arg_info
);
DBUG_RETURN
(
arg_node
);
}
node
*
RSTdoResolveSymbolTypes
(
node
*
syntax_tree
)
{
...
...
src/libsac2c/typecheck/resolvesymboltypes.h
View file @
ba630709
...
...
@@ -22,6 +22,7 @@ extern node *RSTavis (node *arg_node, info *arg_info);
extern
node
*
RSTarray
(
node
*
arg_node
,
info
*
arg_info
);
extern
node
*
RSTcast
(
node
*
arg_node
,
info
*
arg_info
);
extern
node
*
RSTtype
(
node
*
arg_node
,
info
*
arg_info
);
extern
node
*
RSTstructelem
(
node
*
arg_node
,
info
*
arg_info
);
extern
node
*
RSTdoResolveSymbolTypes
(
node
*
syntax_tree
);
#endif
src/libsac2c/xml/ast.xml
View file @
ba630709
...
...
@@ -1458,6 +1458,7 @@
<node
name=
"Objdef"
/>
<node
name=
"Type"
/>
<node
name=
"Cast"
/>
<node
name=
"Structelem"
/>
</travuser>
</traversal>
<traversal
id=
"OI"
name=
"Object Initializer"
default=
"sons"
include=
"object_init.h"
>
...
...
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