Show
Ignore:
Timestamp:
08/19/09 07:28:50 (3 months ago)
Author:
jrhil47
Message:

[ast] Changed Assignment a bit to use a list of CompoundAssignmentInfo? to keep track of checked OpRefs? and hidden coercions.\n[type checker] Integrated the new Assignment info so that compound assignments involving coercion contain that information.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/astgen/Fortress.ast

    r4094 r4096  
    476476                 * e.g.) x += 1 
    477477                 * 
    478                  * <opsForLhs> 
    479                  * An assignment that has passed typechecking, and uses an operator. 
    480                  * Because different static args can be inferred for each Lhs assignment 
    481                  * opr, this node gives a separate FunctionalRef for each Lhs. 
    482                  */ 
    483                 Assignment(List<Lhs> lhs, Option<FunctionalRef> assignOp, Expr rhs, 
    484                            Option<List<FunctionalRef>> opsForLhs); 
     478                 * If this is a compound assignment, there should an assignment 
     479                 * info for every constituent assignment (or 1 if there is only 
     480                 * a single assignment). If this is not a compound assignment, 
     481                 * then there are no assignment infos. 
     482                 */ 
     483                Assignment(List<Lhs> lhs, 
     484                           Option<FunctionalRef> assignOp, 
     485                           Expr rhs, 
     486                           List<CompoundAssignmentInfo> assignmentInfos); 
    485487                /** 
    486488                 * sequence of block elements implicitly enclosed by do/end 
     
    19161918                 */ 
    19171919                MethodInfo(Type selfType, int selfPosition); 
     1920                /** 
     1921                 * Metadata for each constituent assignment in an assignment 
     1922                 * expression. `opForLhs` contains the FunctionalRef representing 
     1923                 * the actual checked operator for this compound assignment. 
     1924                 * `compoundCoercionOuter` holds the coercion for the outer 
     1925                 * compound OpExpr. `compoundCoercionInner` holds the coercion 
     1926                 * for the occurence of the LHS within the OpExpr. 
     1927                 */ 
     1928                CompoundAssignmentInfo(FunctionalRef opForLhs, 
     1929                                       Option<CoercionInvocation> compoundCoercionOuter, 
     1930                                       Option<CoercionInvocation> compoundCoercionInner); 
    19181931            /* 
    19191932             * Keeps track of ellipses properties. This is special cased