Package org.eclipse.php.internal.core.ast.nodes

Examples of org.eclipse.php.internal.core.ast.nodes.FunctionDeclaration.formalParameters()


    String expected = "<?php function foo($b, $c = 5) { $a= 5; $b = 6; $c = 7; } ?>";
    parseAndCompare(str, expected, new ICodeManiplator() {
      public void manipulate(Program program) {
        FunctionDeclaration statement = (FunctionDeclaration) program
            .statements().get(0);
        statement.formalParameters().remove(0);
      }
    });
  }

  public void testDeleteFunctionFormalLast() throws Exception {
View Full Code Here


    String expected = "<?php function foo($a, $b) { $a= 5; $b = 6; $c = 7; } ?>";
    parseAndCompare(str, expected, new ICodeManiplator() {
      public void manipulate(Program program) {
        FunctionDeclaration statement = (FunctionDeclaration) program
            .statements().get(0);
        statement.formalParameters().remove(2);
      }
    });
  }

  public void testDeleteFunctionFormalMiddle() throws Exception {
View Full Code Here

    String expected = "<?php function foo($a, $c = 5) { $a= 5; $b = 6; $c = 7; } ?>";
    parseAndCompare(str, expected, new ICodeManiplator() {
      public void manipulate(Program program) {
        FunctionDeclaration statement = (FunctionDeclaration) program
            .statements().get(0);
        statement.formalParameters().remove(1);
      }
    });
  }

  public void testDeleteFunctionBodyFirst() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.