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

Integer value fix

parent 90e1a63f
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<groupId>de.monticore.lang.monticar</groupId> <groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnn-arch</artifactId> <artifactId>cnn-arch</artifactId>
<version>0.2.3-SNAPSHOT</version> <version>0.2.4-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= --> <!-- == PROJECT DEPENDENCIES ============================================= -->
......
...@@ -29,6 +29,8 @@ import de.se_rwth.commons.logging.Log; ...@@ -29,6 +29,8 @@ import de.se_rwth.commons.logging.Log;
public class CNNArchCocos { public class CNNArchCocos {
public static void checkAll(ArchitectureSymbol architecture){ public static void checkAll(ArchitectureSymbol architecture){
Log.getFindings().clear();
Log.enableFailQuick(false);
ASTCNNArchNode node = (ASTCNNArchNode) architecture.getAstNode().get(); ASTCNNArchNode node = (ASTCNNArchNode) architecture.getAstNode().get();
int findings = Log.getFindings().size(); int findings = Log.getFindings().size();
createASTChecker().checkAll(node); createASTChecker().checkAll(node);
......
...@@ -178,6 +178,9 @@ abstract public class ArchExpressionSymbol extends CommonSymbol { ...@@ -178,6 +178,9 @@ abstract public class ArchExpressionSymbol extends CommonSymbol {
if (optValue.isPresent() && (optValue.get() instanceof Integer)){ if (optValue.isPresent() && (optValue.get() instanceof Integer)){
return Optional.of((Integer) optValue.get()); 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(); return Optional.empty();
} }
......
Supports Markdown
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