private Context translateRecordAssign ( WyilFile . Expr . RecordAccess lval , Expr rval , Context context ) { // Translate src expression Pair < Expr , Context > p1 = translateExpressionWithChecks ( lval . getOperand ( ) , null , context ) ; Expr source = p1 . first ( ) ; WyalFile . Identifier field = new WyalFile . Identifier ( lval . getField ( ) . toString ( ) ) ; // Construct record update for "pass thru" Expr update = new Expr . RecordUpdate ( source , field , rval ) ; return translateSingleAssignment ( ( WyilFile . LVal ) lval . getOperand ( ) , update , p1 . second ( ) ) ; }
Translate an assignment to a field .