Changeset 2391


Ignore:
Timestamp:
Sep 22, 2012, 5:33:07 PM (7 years ago)
Author:
ksherdy
Message:

Refactored visitor StreamFunctionVisitor? as a class of static methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/pablo/src/compiler/visitors/StreamFunctionVisitor.java

    r2389 r2391  
    2020
    2121public class StreamFunctionVisitor {
    22         private ASTNode ASTree;
    2322       
    24         public StreamFunctionVisitor(ASTNode ASTree) {
    25                 this.ASTree = ASTree;
    26         }
    27        
    28         public Map<String, ASTNode> makeStreamFunctionMap() {
     23        public static Map<String, ASTNode> makeStreamFunctionMap(ASTNode node) {
    2924                VoidVisitor visitor = new StreamFunctionVisitor1();
    30                 ASTree.accept(visitor);
     25                node.accept(visitor);
    3126                return ((StreamFunctionVisitor1)visitor).streamFunctionMap();
    3227        }
    3328       
    34         private class StreamFunctionVisitor1 extends VoidVisitor.Default {
     29        private static class StreamFunctionVisitor1 extends VoidVisitor.Default {
    3530               
    3631                private LinkedHashMap<String, ASTNode> streamFunctionMap = new LinkedHashMap<String, ASTNode>();
Note: See TracChangeset for help on using the changeset viewer.