Examples of VariableDeclarationList


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

    return super.visitSuperConstructorInvocation(node);
  }

  @Override
  public Void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
    VariableDeclarationList variables = node.getVariables();
    for (VariableDeclaration variableDeclaration : variables.getVariables()) {
      Element element = variableDeclaration.getElement();
      recordElementDefinition(element, IndexConstants.DEFINES_VARIABLE);
    }
    return super.visitTopLevelVariableDeclaration(node);
  }
View Full Code Here

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

  @Override
  public Void visitFieldDeclaration(FieldDeclaration node) {
    isInStaticVariableDeclaration = node.isStatic();
    isInInstanceVariableDeclaration = !isInStaticVariableDeclaration;
    if (isInInstanceVariableDeclaration) {
      VariableDeclarationList variables = node.getFields();
      if (variables.isConst()) {
        errorReporter.reportErrorForToken(
            CompileTimeErrorCode.CONST_INSTANCE_FIELD,
            variables.getKeyword());
      }
    }
    try {
      checkForAllInvalidOverrideErrorCodesForField(node);
      return super.visitFieldDeclaration(node);
View Full Code Here

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

  private boolean checkForAllInvalidOverrideErrorCodesForField(FieldDeclaration node) {
    if (enclosingClass == null || node.isStatic()) {
      return false;
    }
    boolean hasProblems = false;
    VariableDeclarationList fields = node.getFields();
    for (VariableDeclaration field : fields.getVariables()) {
      FieldElement element = (FieldElement) field.getElement();
      if (element == null) {
        continue;
      }
      PropertyAccessorElement getter = element.getGetter();
View Full Code Here

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

      return;
    }
    ArrayList<ElementAnnotationImpl> annotationList = new ArrayList<ElementAnnotationImpl>();
    addAnnotations(annotationList, node.getMetadata());
    if (node instanceof VariableDeclaration && node.getParent() instanceof VariableDeclarationList) {
      VariableDeclarationList list = (VariableDeclarationList) node.getParent();
      addAnnotations(annotationList, list.getMetadata());
      if (list.getParent() instanceof FieldDeclaration) {
        FieldDeclaration fieldDeclaration = (FieldDeclaration) list.getParent();
        addAnnotations(annotationList, fieldDeclaration.getMetadata());
      } else if (list.getParent() instanceof TopLevelVariableDeclaration) {
        TopLevelVariableDeclaration variableDeclaration = (TopLevelVariableDeclaration) list.getParent();
        addAnnotations(annotationList, variableDeclaration.getMetadata());
      }
    }
    if (!annotationList.isEmpty()) {
      ((ElementImpl) element).setMetadata(annotationList.toArray(new ElementAnnotationImpl[annotationList.size()]));
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.