]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBlock.java
(refs #7436) Added location information to ECHRRuleset
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EBlock.java
index ea47c57b23a5cb90fe33be40fd626590ee910261..50f29965130ddf38abfc888ef8cd3099cde29421 100644 (file)
@@ -76,10 +76,14 @@ public class EBlock extends ASTExpression {
                 case Rule:
                     in = extractRules(i, endId, in);
                     break;
-                case CHR:
-                    in = new ECHRRuleset(extractCHRRules(context, i, endId), in);
+                case CHR: {
+                    CHRRuleset ruleset = extractCHRRules(context, i, endId);
+                    long location = Locations.combine(ruleset.location, in.location);
+                    in = new ECHRRuleset(ruleset, in);
+                    in.location = location;
                     break;
                 }
+                }
             }
         }
         return in.resolve(context);