/** * Returns {@code true} if this node is constant or of type INTEGER, REAL or RATIONAL, {@code false} otherwise. * * @return {@code true} if this ASTNode is constant or of type INTEGER, REAL or RATIONAL, {@code false} otherwise. */ public boolean isLiteral() { return isConstant() || type == Type.INTEGER || type == Type.RATIONAL || type == Type.REAL; }
@Override public boolean getAllowsChildren() { return !(isConstant() || isInfinity() || isNumber() || isNegInfinity() || isNaN() || isRational()); }
(node.getType() != Type.NAME_TIME) && if (!node.isConstant()) { if (param == null) { SBase variable=node.getVariable();
if (variable != null) { return variable.getDerivedUnitDefinition(); } else if (isConstant()) { UnitDefinition ud = new UnitDefinition(level, level); ud.addUnit(Unit.Kind.DIMENSIONLESS);
if (node.isNumber() || node.isOperator() || node.isConstant()) { return DT_NUMBER;