Skip to content

Commit

Permalink
drop unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnrd committed Mar 7, 2024
1 parent d7fa1e9 commit 210a7e0
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions core/src/main/java/org/lflang/ast/ASTUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -999,48 +999,6 @@ public static boolean isFloat(String literal) {
return true;
}

/**
* Report whether the given code is an integer number or not.
*
* @param code AST node to inspect.
* @return True if the given code is an integer, false otherwise.
*/
public static boolean isInteger(Code code) {
return isInteger(toText(code));
}

/**
* Report whether the given expression is an integer number or not.
*
* @param expr AST node to inspect.
* @return True if the given value is an integer, false otherwise.
*/
public static boolean isInteger(Expression expr) {
if (expr instanceof Literal) {
return isInteger(((Literal) expr).getLiteral());
} else if (expr instanceof Code) {
return isInteger((Code) expr);
}
return false;
}

/**
* Report whether the given expression denotes a valid time or not.
*
* @param expr AST node to inspect.
* @return True if the argument denotes a valid time, false otherwise.
*/
public static boolean isValidTime(Expression expr) {
if (expr instanceof ParameterReference) {
return isOfTimeType(((ParameterReference) expr).getParameter());
} else if (expr instanceof Time) {
return isValidTime((Time) expr);
} else if (expr instanceof Literal) {
return isZero(((Literal) expr).getLiteral());
}
return false;
}

/**
* Report whether the given time denotes a valid time or not.
*
Expand Down

0 comments on commit 210a7e0

Please sign in to comment.