Changeset 2d2df9f
- Timestamp:
- Feb 20, 2019, 10:02:08 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 1b54b54
- Parents:
- 96df1329
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r96df1329 r2d2df9f 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 14 22:23:13201913 // Update Count : 42 1712 // Last Modified On : Wed Feb 20 17:53:55 2019 13 // Update Count : 4231 14 14 // 15 15 … … 191 191 return new ForCtrl( 192 192 distAttr( DeclarationNode::newTypeof( type, true ), DeclarationNode::newName( index )->addInitializer( new InitializerNode( start ) ) ), 193 new ExpressionNode( build_binary_val( compop, new ExpressionNode( build_varref( new string( *index ) ) ), comp ) ), 194 new ExpressionNode( build_binary_val( compop == OperKinds::LThan || compop == OperKinds::LEThan ? // choose += or -= for upto/downto 195 OperKinds::PlusAssn : OperKinds::MinusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) ); 193 // NULL comp/inc => leave blank 194 comp ? new ExpressionNode( build_binary_val( compop, new ExpressionNode( build_varref( new string( *index ) ) ), comp ) ) : 0, 195 inc ? new ExpressionNode( build_binary_val( compop == OperKinds::LThan || compop == OperKinds::LEThan ? // choose += or -= for upto/downto 196 OperKinds::PlusAssn : OperKinds::MinusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) : 0 ); 196 197 } // forCtrl 197 198 … … 1168 1169 | comma_expression ';' comma_expression inclexcl comma_expression '~' comma_expression // CFA 1169 1170 { $$ = forCtrl( $3, $1, $3->clone(), $4, $5, $7 ); } 1171 | comma_expression ';' comma_expression '~' '@' '~' comma_expression // CFA 1172 { $$ = forCtrl( $3, $1, $3->clone(), OperKinds::LThan, nullptr, $7 ); } 1173 | comma_expression ';' comma_expression '~' '@' '~' '@' // CFA 1174 { $$ = forCtrl( $3, $1, $3->clone(), OperKinds::LThan, nullptr, nullptr ); } 1170 1175 ; 1171 1176
Note: See TracChangeset
for help on using the changeset viewer.