Package tree.expression

Examples of tree.expression.Binary


                  // Haxe.g:285:33: BARBAR ^ logicAndExpr
                  {
                  BARBAR180=(Token)match(input,BARBAR,FOLLOW_BARBAR_in_logicOrExpr2985); if (state.failed) return retval;
                  if ( state.backtracking==0 ) {
                  BARBAR180_tree =
                  new Binary(BARBAR180)
                  ;
                  root_0 = (Object)adaptor.becomeRoot(BARBAR180_tree, root_0);
                  }

                  pushFollow(FOLLOW_logicAndExpr_in_logicOrExpr2991);
View Full Code Here


                  // Haxe.g:288:28: AMPAMP ^ iterExpr
                  {
                  AMPAMP183=(Token)match(input,AMPAMP,FOLLOW_AMPAMP_in_logicAndExpr3027); if (state.failed) return retval;
                  if ( state.backtracking==0 ) {
                  AMPAMP183_tree =
                  new Binary(AMPAMP183)
                  ;
                  root_0 = (Object)adaptor.becomeRoot(AMPAMP183_tree, root_0);
                  }

                  pushFollow(FOLLOW_iterExpr_in_logicAndExpr3033);
View Full Code Here

                    // Haxe.g:291:28: ELLIPSIS ^ cmpExpr
                    {
                    ELLIPSIS186=(Token)match(input,ELLIPSIS,FOLLOW_ELLIPSIS_in_iterExpr3086); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    ELLIPSIS186_tree =
                    new Binary(ELLIPSIS186)
                    ;
                    root_0 = (Object)adaptor.becomeRoot(ELLIPSIS186_tree, root_0);
                    }

                    pushFollow(FOLLOW_cmpExpr_in_iterExpr3092);
View Full Code Here

                          // Haxe.g:295:23: EQEQ ^
                          {
                          EQEQ189=(Token)match(input,EQEQ,FOLLOW_EQEQ_in_cmpExpr3158); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          EQEQ189_tree =
                          new Binary(EQEQ189)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(EQEQ189_tree, root_0);
                          }

                          }
                          break;
                      case 2 :
                          // Haxe.g:296:23: BANGEQ ^
                          {
                          BANGEQ190=(Token)match(input,BANGEQ,FOLLOW_BANGEQ_in_cmpExpr3187); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          BANGEQ190_tree =
                          new Binary(BANGEQ190)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(BANGEQ190_tree, root_0);
                          }

                          }
                          break;
                      case 3 :
                          // Haxe.g:297:23: GTEQ ^
                          {
                          GTEQ191=(Token)match(input,GTEQ,FOLLOW_GTEQ_in_cmpExpr3216); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          GTEQ191_tree =
                          new Binary(GTEQ191)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(GTEQ191_tree, root_0);
                          }

                          }
                          break;
                      case 4 :
                          // Haxe.g:298:23: LTEQ ^
                          {
                          LTEQ192=(Token)match(input,LTEQ,FOLLOW_LTEQ_in_cmpExpr3245); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          LTEQ192_tree =
                          new Binary(LTEQ192)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(LTEQ192_tree, root_0);
                          }

                          }
                          break;
                      case 5 :
                          // Haxe.g:299:23: GT ^
                          {
                          GT193=(Token)match(input,GT,FOLLOW_GT_in_cmpExpr3274); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          GT193_tree =
                          new Binary(GT193)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(GT193_tree, root_0);
                          }

                          }
                          break;
                      case 6 :
                          // Haxe.g:300:23: LT ^
                          {
                          LT194=(Token)match(input,LT,FOLLOW_LT_in_cmpExpr3303); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          LT194_tree =
                          new Binary(LT194)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(LT194_tree, root_0);
                          }

                          }
View Full Code Here

                          // Haxe.g:304:23: BAR ^
                          {
                          BAR197=(Token)match(input,BAR,FOLLOW_BAR_in_bitExpr3376); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          BAR197_tree =
                          new Binary(BAR197)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(BAR197_tree, root_0);
                          }

                          }
                          break;
                      case 2 :
                          // Haxe.g:305:23: AMP ^
                          {
                          AMP198=(Token)match(input,AMP,FOLLOW_AMP_in_bitExpr3405); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          AMP198_tree =
                          new Binary(AMP198)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(AMP198_tree, root_0);
                          }

                          }
                          break;
                      case 3 :
                          // Haxe.g:306:23: CARET ^
                          {
                          CARET199=(Token)match(input,CARET,FOLLOW_CARET_in_bitExpr3434); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          CARET199_tree =
                          new Binary(CARET199)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(CARET199_tree, root_0);
                          }

                          }
View Full Code Here

                          // Haxe.g:310:23: LTLT ^
                          {
                          LTLT202=(Token)match(input,LTLT,FOLLOW_LTLT_in_shiftExpr3501); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          LTLT202_tree =
                          new Binary(LTLT202)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(LTLT202_tree, root_0);
                          }

                          }
                          break;
                      case 2 :
                          // Haxe.g:311:23: GTGT ^
                          {
                          GTGT203=(Token)match(input,GTGT,FOLLOW_GTGT_in_shiftExpr3530); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          GTGT203_tree =
                          new Binary(GTGT203)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(GTGT203_tree, root_0);
                          }

                          }
                          break;
                      case 3 :
                          // Haxe.g:312:23: GTGTGT ^
                          {
                          GTGTGT204=(Token)match(input,GTGTGT,FOLLOW_GTGTGT_in_shiftExpr3559); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          GTGTGT204_tree =
                          new Binary(GTGTGT204)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(GTGTGT204_tree, root_0);
                          }

                          }
View Full Code Here

                          // Haxe.g:316:23: PLUS ^
                          {
                          PLUS207=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr3628); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          PLUS207_tree =
                          new Binary(PLUS207)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(PLUS207_tree, root_0);
                          }

                          }
                          break;
                      case 2 :
                          // Haxe.g:317:23: SUB ^
                          {
                          SUB208=(Token)match(input,SUB,FOLLOW_SUB_in_addExpr3657); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          SUB208_tree =
                          new Binary(SUB208)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(SUB208_tree, root_0);
                          }

                          }
View Full Code Here

                          // Haxe.g:321:23: STAR ^
                          {
                          STAR211=(Token)match(input,STAR,FOLLOW_STAR_in_multExpr3730); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          STAR211_tree =
                          new Binary(STAR211)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(STAR211_tree, root_0);
                          }

                          }
                          break;
                      case 2 :
                          // Haxe.g:322:23: SLASH ^
                          {
                          SLASH212=(Token)match(input,SLASH,FOLLOW_SLASH_in_multExpr3759); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          SLASH212_tree =
                          new Binary(SLASH212)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(SLASH212_tree, root_0);
                          }

                          }
                          break;
                      case 3 :
                          // Haxe.g:323:23: PERCENT ^
                          {
                          PERCENT213=(Token)match(input,PERCENT,FOLLOW_PERCENT_in_multExpr3788); if (state.failed) return retval;
                          if ( state.backtracking==0 ) {
                          PERCENT213_tree =
                          new Binary(PERCENT213)
                          ;
                          root_0 = (Object)adaptor.becomeRoot(PERCENT213_tree, root_0);
                          }

                          }
View Full Code Here

    @Test
    public void testBinOpWithParenthesis() throws RecognitionException {
        HaxeTree tree = parseExpression("z*(x*y)");
        assertTrue(tree instanceof Binary);
        assertTrue(tree.getChildCount() == 2);
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

   
    // Priority without parenthesis
    @Test
    public void testBinOpPriority1() throws RecognitionException {
        HaxeTree tree = parseExpression("z || x && y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

TOP

Related Classes of tree.expression.Binary

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.