Package com.google.dart.engine.ast

Examples of com.google.dart.engine.ast.FormalParameter


        initialFieldElementsMap);

    // Visit all of the field formal parameters
    NodeList<FormalParameter> formalParameters = node.getParameters().getParameters();
    for (FormalParameter formalParameter : formalParameters) {
      FormalParameter parameter = formalParameter;
      if (parameter instanceof DefaultFormalParameter) {
        parameter = ((DefaultFormalParameter) parameter).getParameter();
      }
      if (parameter instanceof FieldFormalParameter) {
        FieldElement fieldElement = ((FieldFormalParameterElementImpl) parameter.getElement()).getField();
        INIT_STATE state = fieldElementsMap.get(fieldElement);
        if (state == INIT_STATE.NOT_INIT) {
          fieldElementsMap.put(fieldElement, INIT_STATE.INIT_IN_FIELD_FORMAL);
        } else if (state == INIT_STATE.INIT_IN_DECLARATION) {
          if (fieldElement.isFinal() || fieldElement.isConst()) {
View Full Code Here


    closure.setPropagatedType(expectedClosureType);
    // set inferred types for parameters
    NodeList<FormalParameter> parameters = closure.getParameters().getParameters();
    ParameterElement[] expectedParameters = expectedClosureType.getParameters();
    for (int i = 0; i < parameters.size() && i < expectedParameters.length; i++) {
      FormalParameter parameter = parameters.get(i);
      ParameterElement element = parameter.getElement();
      Type currentType = getBestType(element);
      // may be override the type
      Type expectedType = expectedParameters[i].getType();
      if (currentType == null || expectedType.isMoreSpecificThan(currentType)) {
        overrideManager.setType(element, expectedType);
View Full Code Here

TOP

Related Classes of com.google.dart.engine.ast.FormalParameter

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.