Examples of IdentifierExpression


Examples of com.github.sommeri.less4j.core.ast.IdentifierExpression

    ASTCssNode value = evaluate(input);
    if (value.getType() != ASTCssNodeType.IDENTIFIER_EXPRESSION)
      return false;

    //this comparison must be case sensitive!
    IdentifierExpression identifier = (IdentifierExpression) value;
    return "true".equals(identifier.getValue());
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.IdentifierExpression

    return input.getName().equals("constant") && parameters.isEmpty();
  }

  @Override
  public Expression evaluate(FunctionExpression input, List<Expression> parameters, Expression evaluatedParameter, LessProblems problems) {
    return new IdentifierExpression(input.getUnderlyingStructure(), "fixed");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.IdentifierExpression

    return input.getName().equals("worksWithNone") && parameters.isEmpty();
  }

  @Override
  public Expression evaluate(FunctionExpression input, List<Expression> parameters, Expression evaluatedParameter, LessProblems problems) {
    return new IdentifierExpression(input.getUnderlyingStructure(), "worked");
  }
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.IdentifierExpression

  @Override
  public Expression evaluate(FunctionExpression input, List<Expression> parameters, Expression evaluatedParameter, LessProblems problems) {
    problems.addWarning(evaluatedParameter, "With custom error node.");
    problems.addWarning(null, "Null error node.");
    return new IdentifierExpression(input.getUnderlyingStructure(), "caused");
  }
View Full Code Here

Examples of com.strobel.decompiler.languages.java.ast.IdentifierExpression

    }

    @Override
    public boolean matches(final INode other, final Match match) {
        if (other instanceof IdentifierExpression) {
            final IdentifierExpression identifier = (IdentifierExpression) other;
            final Variable variable = identifier.getUserData(Keys.VARIABLE);

            if (variable != null &&
                variable.isParameter() &&
                variable.getOriginalParameter().getPosition() == _parameterPosition) {
View Full Code Here

Examples of com.strobel.decompiler.languages.java.ast.IdentifierExpression

    }

    @Override
    public boolean matches(final INode other, final Match match) {
        if (other instanceof IdentifierExpression) {
            final IdentifierExpression identifier = (IdentifierExpression) other;

            if (_pattern.matcher(identifier.getIdentifier()).matches()) {
                match.add(_groupName, identifier);
                return true;
            }
        }
View Full Code Here

Examples of com.strobel.decompiler.languages.java.ast.IdentifierExpression

    }

    @Override
    public boolean matches(final INode other, final Match match) {
        if (other instanceof IdentifierExpression) {
            final IdentifierExpression identifier = (IdentifierExpression) other;
            final Variable variable = identifier.getUserData(Keys.VARIABLE);

            if (variable != null &&
                variable.isParameter() &&
                variable.getOriginalParameter().getPosition() == _parameterPosition) {
View Full Code Here

Examples of com.strobel.decompiler.languages.java.ast.IdentifierExpression

    }

    @Override
    public boolean matches(final INode other, final Match match) {
        if (other instanceof IdentifierExpression) {
            final IdentifierExpression identifier = (IdentifierExpression) other;

            if (_pattern.matcher(identifier.getIdentifier()).matches()) {
                match.add(_groupName, identifier);
                return true;
            }
        }
View Full Code Here

Examples of com.strobel.decompiler.languages.java.ast.IdentifierExpression

        for (final AstNode n : traversal) {
            if (!(n instanceof IdentifierExpression)) {
                continue;
            }

            final IdentifierExpression identifier = (IdentifierExpression) n;
            final UsageType usage = UsageClassifier.getUsageType(identifier);

            if (mode == CorrelationMode.Read) {
                if (usage != UsageType.Read && usage != UsageType.ReadWrite) {
                    continue;
                }
            }
            else if (usage != UsageType.Write && usage != UsageType.ReadWrite) {
                continue;
            }

            IMetadataTypeMember member = identifier.getUserData(Keys.MEMBER_REFERENCE);

            if (member != null) {
                members.add(member);
                continue;
            }

            final Variable variable = identifier.getUserData(Keys.VARIABLE);

            if (variable != null) {
                if (variable.isParameter()) {
                    member = variable.getOriginalParameter();
                }
View Full Code Here

Examples of org.lilystudio.javascript.expression.IdentifierExpression

    while (true) {
      int i = 0;
      for (Node childNode = node.getFirstChild(); childNode != null; childNode = childNode
          .getNext()) {
        Node valueNode = childNode.getFirstChild();
        IdentifierExpression id = (IdentifierExpression) addExpression(
            childNode, root, scope);
        if (valueNode != null) {
          IExpression value = addExpression(valueNode, root, scope);
          BinaryExpression assignment = new BinaryExpression(node.getLineno(),
              Token.ASSIGN, id, value);
          assignment.setParent(this);
          if (value instanceof NumericLiteral
              && ((NumericLiteral) value).getValue() == 0
              && id.getName().getString().length() == 1) {
            params.add(i++, assignment);
            id.getName().inc(10000000 - i * 10000);
          } else {
            params.add(assignment);
          }
        } else {
          params.add(id);
        }
        if (isFirst) {
          id.getName().inc(1000);
          isFirst = false;
        }
      }

      node = node.getNext();
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.