Commit 2b437eb6 authored by Evgeny Kusmenko's avatar Evgeny Kusmenko
Browse files

Merge branch 'integer_value_fix' into 'master'

Integer value fix

See merge request !10
parents 90e1a63f e0cb323a
Pipeline #70142 passed with stages
in 21 minutes and 36 seconds
......@@ -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();
}
......
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