Package org.openquark.cal.compiler.Expression

Examples of org.openquark.cal.compiler.Expression.RecordSelection


                    break;
                   
                case 6:
                case 14:
                {
                    RecordSelection rs = exprOptimized.asRecordSelection();
                    assertTrue( rs != null );
                    FieldName.Ordinal ordinal = (FieldName.Ordinal) rs.getFieldName();
                    assertTrue(ordinal.getOrdinal() == 1);
                    assertTrue(rs.getRecordExpr() == tuple_1_2);
                }
                break;                   
               
                case 7:
                case 8:
                    assertTrue( exprOptimized.asLiteral() != null );
                    assertTrue(((Integer) exprOptimized.asLiteral().getLiteral()).intValue() == 2);
                    break;
                   
                case 9:
                case 10:
                case 11:
                case 12:
                {
                    Expression.Appl a = exprOptimized.asAppl();
                    assertTrue( a != null );
                    Expression.Appl a_1 = a.getE1().asAppl();
                    assertTrue( a_1 != null );
                    Expression.Var v_1_1 = a_1.getE1().asVar();
                    assertTrue( v_1_1 != null );
                    assertTrue( v_1_1.getFunctionalAgent() == consDataCons);
                    Expression.Literal v_1_2 = a_1.getE2().asLiteral();
                    assertTrue( v_1_2 != null );
                    assertTrue(((Integer) v_1_2.getLiteral()).intValue() == 1);                   
                    Expression.Var v_2 = a.getE2().asVar();
                    assertTrue( v_2 != null );
                    assertTrue( v_2.getFunctionalAgent() == nilDataCons);
                }
                break;
               
                case 13:
                case 15:
                {
                    RecordSelection rs = exprOptimized.asRecordSelection();
                    assertTrue( rs != null );
                    FieldName.Ordinal ordinal = (FieldName.Ordinal) rs.getFieldName();
                    assertTrue(ordinal.getOrdinal() == 2);
                    assertTrue(rs.getRecordExpr() == tuple_1_2);
                }
                break;                 
               
                }
            }
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.Expression.RecordSelection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.