Changeset 2019
- Timestamp:
- 06/19/08 15:26:30 (5 months ago)
- Files:
-
- trunk/ProjectFortress/astgen/Fortress.ast (modified) (1 diff)
- trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeChecker.java (modified) (1 diff)
- trunk/ProjectFortress/src/com/sun/fortress/interpreter/evaluator/Evaluator.java (modified) (2 diffs)
- trunk/ProjectFortress/src/com/sun/fortress/parser/Symbol.rats (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ProjectFortress/astgen/Fortress.ast
r2017 r2019 720 720 * e.g.) x += 1 721 721 */ 722 Assignment(List<LHS> lhs, Option<Op > opr, Expr rhs);722 Assignment(List<LHS> lhs, Option<OpRef> opr, Expr rhs); 723 723 /** 724 724 * expressions beginning and ending with reserved words trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeChecker.java
r2017 r2019 1837 1837 // successful 1838 1838 all_results.add(new TypeCheckerResult(that, application_result.unwrap().second())); 1839 // wrong: Type should still be void. 1839 1840 result = TypeCheckerResult.compose(that, application_result.unwrap().first(), subtypeChecker, all_results); 1840 1841 } trunk/ProjectFortress/src/com/sun/fortress/interpreter/evaluator/Evaluator.java
r2017 r2019 262 262 // the operator case. Might this cause the world to break? 263 263 public FValue forAssignment(Assignment x) { 264 Option<Op > possOp = x.getOpr();264 Option<OpRef> possOp = x.getOpr(); 265 265 LHSToLValue getLValue = new LHSToLValue(this); 266 266 List<? extends LHS> lhses = getLValue.inParallel(x.getLhs()); … … 271 271 // We created an lvalue for lhses above, so there should 272 272 // be no fear of duplicate evaluation. 273 Op opr = possOp.unwrap(); 273 OpRef opr_ = possOp.unwrap(); 274 OpName opr = opr_.getOriginalName(); 274 275 Fcn fcn = (Fcn) opr.accept(this); 275 276 FValue lhsValue; trunk/ProjectFortress/src/com/sun/fortress/parser/Symbol.rats
r1874 r2019 168 168 / singleOp ; 169 169 170 Op CompoundOp =170 OpRef CompoundOp = 171 171 a1:(encloser / op) equalsOp 172 { yyValue = NodeFactory.makeOpInfix(createSpan(yyStart, yyCount), a1); };172 { yyValue = ExprFactory.makeOpRef(NodeFactory.makeOpInfix(createSpan(yyStart, yyCount), a1)); }; 173 173 174 174 /* The operator "=>" should not be in the left-hand sides of … … 229 229 230 230 /* AssignOp ::= := | Op= */ 231 Option<Op > AssignOp =231 Option<OpRef> AssignOp = 232 232 colonequals { yyValue = Option.none(); } 233 233 / a1:CompoundOp { yyValue = Option.some(a1); };
