Package com.intellij.psi

Examples of com.intellij.psi.PsiElement.accept()


    final String head = functionCall.getHead().getText();
    if (head.matches("Set|SetDelayed")) {
      final PsiElement lhs = functionCall.getArgument(1);
      if (lhs != null) {
        final SetDefinitionSymbolVisitor visitor = new SetDefinitionSymbolVisitor(lhs);
        lhs.accept(visitor);
        cacheAssignedSymbols(visitor.getUnboundSymbols());
      }
    } else if (head.matches("TagSet|TagSetDelayed|SetAttributes|SetOptions")) {
      final PsiElement arg1 = functionCall.getArgument(1);
      if (arg1 instanceof Symbol) {
View Full Code Here


  }

  private void cacheFromSetAssignment(PsiElement element) {
    final PsiElement lhs = element.getFirstChild();
    SetDefinitionSymbolVisitor visitor = new SetDefinitionSymbolVisitor(lhs);
    lhs.accept(visitor);
    cacheAssignedSymbols(visitor.getUnboundSymbols());
  }

  private void cacheFromUpSetAssignment(final PsiElement upSet) {
    final PsiElement lhs = upSet.getFirstChild();
View Full Code Here

  }

  private void cacheFromUpSetAssignment(final PsiElement upSet) {
    final PsiElement lhs = upSet.getFirstChild();
    UpSetDefinitionSymbolVisitor visitor = new UpSetDefinitionSymbolVisitor();
    lhs.accept(visitor);
    cacheAssignedSymbols(visitor.getUnboundSymbols());
  }

  private void cacheAssignedSymbols(Set<Symbol> symbolSet) {
    if (symbolSet != null) {
View Full Code Here

  @Override
  public void visitOptional(Optional optional) {
    PsiElement firstChild = optional.getFirstChild();
    if (firstChild != null) {
      firstChild.accept(this);
    }
  }

  @Override
  public void visitCondition(Condition condition) {
View Full Code Here

  @Override
  public void visitCondition(Condition condition) {
    PsiElement firstChild = condition.getFirstChild();
    if (firstChild != null) {
      firstChild.accept(this);
    }
  }

  @Override
  public void visitPattern(Pattern pattern) {
View Full Code Here

  @Override
  public void visitSetDelayed(SetDelayed setDelayed) {
    final PsiElement lhs = setDelayed.getFirstChild();
    myAssignmentType = Assignment.SET_DELAYED_;
    lhs.accept(this);
  }

  @Override
  public void visitSet(de.halirutan.mathematica.parsing.psi.api.assignment.Set set) {
    final PsiElement lhs = set.getFirstChild();
View Full Code Here

  @Override
  public void visitSet(de.halirutan.mathematica.parsing.psi.api.assignment.Set set) {
    final PsiElement lhs = set.getFirstChild();
    myAssignmentType = Assignment.SET_;
    lhs.accept(this);
  }

  @Override
  public void visitTagSet(TagSet tagSet) {
    myAssignmentType = Assignment.TAG_SET_;
View Full Code Here

    if (operator == null) {
      return;
    }
    final PsiElement pattern = MathematicaPsiUtilities.getNextSiblingSkippingWhitespace(operator);
    if (pattern != null) {
      pattern.accept(this);
    }
  }

  @Override
  public void visitSymbol(final Symbol symbol) {
View Full Code Here

    if (operator == null) {
      return;
    }
    final PsiElement pattern = MathematicaPsiUtilities.getNextSiblingSkippingWhitespace(operator);
    if (pattern != null) {
      pattern.accept(this);
    }
  }

  @Override
  public void visitRuleDelayed(RuleDelayed ruleDelayed) {
View Full Code Here

  @Override
  public void visitRuleDelayed(RuleDelayed ruleDelayed) {
    final PsiElement lhs = ruleDelayed.getFirstChild();
    myAssignmentType = Assignment.NONE_;
    lhs.accept(this);
  }

  @Override
  public void visitElement(PsiElement element) {
    element.acceptChildren(this);
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.