Package org.eclipse.dltk.ast.statements

Examples of org.eclipse.dltk.ast.statements.Block


    int innerEnd = 0;
    if (body != null && !body.isEmpty()) {
      innerStart = body.get(0).sourceStart();
      innerEnd = body.get(body.size() - 1).sourceEnd();
    }
    Block inner = new Block(innerStart, innerEnd, body);
    block.acceptBody(inner, false);
    block.setRule(rule);
    block.setEnd(rc != null ? getBounds(rc)[1] : rule.sourceEnd());
  }
View Full Code Here


            // } else if (node instanceof RutaExecuteExpression) {
            // RutaExecuteExpression be = (RutaExecuteExpression) node;
            // result.add(new PairBlock(offset + be.sourceStart(),
            // offset + be.sourceEnd() - 1, '['));
          } else if (node instanceof Block) {
            Block be = (Block) node;
            result.add(new PairBlock(offset + be.sourceStart(), offset + be.sourceEnd() - 1, '{'));
          }
          return super.visitGeneral(node);
        }
      });
    } catch (Exception e) {
View Full Code Here

    int innerEnd = 0;
    if (body != null && !body.isEmpty()) {
      innerStart = body.get(0).sourceStart();
      innerEnd = body.get(body.size() - 1).sourceEnd();
    }
    Block inner = new Block(innerStart, innerEnd, body);
    block.acceptBody(inner, false);
    block.setRule(rule);
    block.setEnd(rc != null ? getBounds(rc)[1] : rule.sourceEnd());
  }
View Full Code Here

            // } else if (node instanceof RutaExecuteExpression) {
            // RutaExecuteExpression be = (RutaExecuteExpression) node;
            // result.add(new PairBlock(offset + be.sourceStart(),
            // offset + be.sourceEnd() - 1, '['));
          } else if (node instanceof Block) {
            Block be = (Block) node;
            result.add(new PairBlock(offset + be.sourceStart(), offset + be.sourceEnd() - 1, '{'));
          }
          return super.visitGeneral(node);
        }
      });
    } catch (Exception e) {
View Full Code Here

      // we don't add top level statements to the program node this way
      return;
    }
    Statement node = declarations.peek();
    Block block = null;
    if (node instanceof TypeDeclaration) {
      block = ((TypeDeclaration) node).getBody();
    } else if (node instanceof MethodDeclaration) {
      block = ((MethodDeclaration) node).getBody();
    } else if (node instanceof Block) {
      block = (Block) node;
    }
    if (block == null) {
      return;
    }
    block.addStatement(s);
    block.setEnd(s.sourceEnd());
  }
View Full Code Here

  public NamespaceDeclaration(int start, int end, int nameStart, int nameEnd, String className, Block body, PHPDocBlock phpDoc) {
    super(className, nameStart, nameEnd, start, end);
    this.phpDoc = phpDoc;
    if (body == null) {
      body = new Block(start, end);
    }
    setBody(body);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.ast.statements.Block

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.