Package com.google.dart.engine.element

Examples of com.google.dart.engine.element.FunctionElement


  @Override
  public EvaluationResultImpl visitMethodInvocation(MethodInvocation node) {
    Element element = node.getMethodName().getStaticElement();
    if (element instanceof FunctionElement) {
      FunctionElement function = (FunctionElement) element;
      if (function.getName().equals("identical")) {
        NodeList<Expression> arguments = node.getArgumentList().getArguments();
        if (arguments.size() == 2) {
          Element enclosingElement = function.getEnclosingElement();
          if (enclosingElement instanceof CompilationUnitElement) {
            LibraryElement library = ((CompilationUnitElement) enclosingElement).getLibrary();
            if (library.isDartCore()) {
              EvaluationResultImpl leftArgument = arguments.get(0).accept(this);
              EvaluationResultImpl rightArgument = arguments.get(1).accept(this);
View Full Code Here


  }

  @Override
  public Void visitFunctionExpression(FunctionExpression node) {
    if (!(node.getParent() instanceof FunctionDeclaration)) {
      FunctionElement element = findAtOffset(
          enclosingExecutable.getFunctions(),
          node.getBeginToken().getOffset());
      processElement(element);
    }
    ExecutableElement outerExecutable = enclosingExecutable;
View Full Code Here

        librarySource,
        definingCompilationUnit);
    NodeList<Directive> directives = definingCompilationUnit.getDirectives();
    LibraryIdentifier libraryNameNode = null;
    boolean hasPartDirective = false;
    FunctionElement entryPoint = findEntryPoint(definingCompilationUnitElement);
    ArrayList<Directive> directivesToResolve = new ArrayList<Directive>();
    ArrayList<CompilationUnitElementImpl> sourcedCompilationUnits = new ArrayList<CompilationUnitElementImpl>();
    for (Directive directive : directives) {
      //
      // We do not build the elements representing the import and export directives at this point.
View Full Code Here

        librarySource,
        definingCompilationUnit);
    NodeList<Directive> directives = definingCompilationUnit.getDirectives();
    LibraryIdentifier libraryNameNode = null;
    boolean hasPartDirective = false;
    FunctionElement entryPoint = findEntryPoint(definingCompilationUnitElement);
    ArrayList<Directive> directivesToResolve = new ArrayList<Directive>();
    ArrayList<CompilationUnitElementImpl> sourcedCompilationUnits = new ArrayList<CompilationUnitElementImpl>();
    for (Directive directive : directives) {
      //
      // We do not build the elements representing the import and export directives at this point.
View Full Code Here

  }

  @Override
  public Void visitFunctionExpression(FunctionExpression node) {
    if (!(node.getParent() instanceof FunctionDeclaration)) {
      FunctionElement element = findAtOffset(
          enclosingExecutable.getFunctions(),
          node.getBeginToken().getOffset());
      node.setElement(element);
    }
    ExecutableElement outerExecutable = enclosingExecutable;
View Full Code Here

TOP

Related Classes of com.google.dart.engine.element.FunctionElement

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.