Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DecafPlus
Project
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
Tianqi Yang
DecafPlus
Commits
4dbdfeb7
Commit
4dbdfeb7
authored
Jan 12, 2019
by
Tianqi Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ClassScope): fix the output of ClassScope
Fix the output of ClassScope to iterate over all Functions in all FunctionTables
parent
586f66a3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
ClassScope.java
src/decaf/scope/ClassScope.java
+8
-3
No files found.
src/decaf/scope/ClassScope.java
View file @
4dbdfeb7
package
decaf
.
scope
;
package
decaf
.
scope
;
import
java.util.List
;
import
java.util.TreeSet
;
import
java.util.TreeSet
;
import
decaf.symbol.Class
;
import
decaf.symbol.Class
;
import
decaf.symbol.Function
;
import
decaf.symbol.Function
;
import
decaf.symbol.FunctionTable
;
import
decaf.symbol.Symbol
;
import
decaf.symbol.Symbol
;
import
decaf.utils.IndentPrintWriter
;
import
decaf.utils.IndentPrintWriter
;
...
@@ -48,9 +50,12 @@ public class ClassScope extends Scope {
...
@@ -48,9 +50,12 @@ public class ClassScope extends Scope {
for
(
Symbol
symbol
:
ss
)
{
for
(
Symbol
symbol
:
ss
)
{
pw
.
println
(
symbol
);
pw
.
println
(
symbol
);
}
}
for
(
Symbol
symbol
:
ss
)
{
for
(
Symbol
symbol
:
symbols
.
values
())
{
if
(
symbol
.
isFunction
())
{
if
(
symbol
.
isFunctionTable
())
{
((
Function
)
symbol
).
getAssociatedScope
().
printTo
(
pw
);
List
<
Function
>
functions
=
((
FunctionTable
)
symbol
).
getFunctions
();
for
(
Function
func
:
functions
)
{
func
.
getAssociatedScope
().
printTo
(
pw
);
}
}
}
}
}
pw
.
decIndent
();
pw
.
decIndent
();
...
...
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