Commit e0cb323a authored by Svetlana Pavlitskaya's avatar Svetlana Pavlitskaya Committed by Evgeny Kusmenko

Integer value fix

parent 90e1a63f
......@@ -30,7 +30,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnn-arch</artifactId>
<version>0.2.3-SNAPSHOT</version>
<version>0.2.4-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......
......@@ -29,6 +29,8 @@ import de.se_rwth.commons.logging.Log;
public class CNNArchCocos {
public static void checkAll(ArchitectureSymbol architecture){
Log.getFindings().clear();
Log.enableFailQuick(false);
ASTCNNArchNode node = (ASTCNNArchNode) architecture.getAstNode().get();
int findings = Log.getFindings().size();
createASTChecker().checkAll(node);
......
......@@ -178,6 +178,9 @@ abstract public class ArchExpressionSymbol extends CommonSymbol {
if (optValue.isPresent() && (optValue.get() instanceof Integer)){
return Optional.of((Integer) optValue.get());
}
else if (optValue.isPresent() && (optValue.get() instanceof Double) && (((Double)optValue.get() % 1)== 0)) {
return Optional.of(((Double) optValue.get()).intValue());
}
return Optional.empty();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment