Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
Do not remove added lines that don't match label
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - #2099
  - OpenModelica/OpenModelica-testsuite#815

Belonging to [maintenance/v1.12]:
  - #2100
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Jan 9, 2018
1 parent e2917bf commit 67d4103
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Compiler/Parsers/SimpleModelicaParser.mo
Expand Up @@ -2127,9 +2127,7 @@ algorithm
acc := {};
for t in lst loop
// Assuming adjacent to the delete node
if found then
res := (Diff.Add, {t})::res;
elseif compare(nodeLabel(t), labelOfDiffedNodes) then
if (not found) and compare(nodeLabel(t), labelOfDiffedNodes) then
if not listEmpty(acc) then
res := (Diff.Add, listReverse(acc))::res;
acc := {};
Expand All @@ -2138,6 +2136,8 @@ algorithm
filtered := listReverse(i for i guard match i case (Diff.Delete,_) then false; else true; end match in diffedNodes);
res := listAppend(filtered, res);
found := true;
else
res := (Diff.Add, {t})::res;
end if;
end for;
if not listEmpty(acc) then
Expand Down

0 comments on commit 67d4103

Please sign in to comment.