ballerina-dev-tools
ballerina-dev-tools copied to clipboard
Implement an LS extension for the revamped sequence diagram
Description:
$title. To grasp the idea of the revamped sequence diagram, consider the following source code and its produced diagram. In contrast to what we have now, the proposed sequence diagram only highlights the interactions and the nodes related to such interactions. The proposed LS extension produces the JSON model required to visualize the diagram.
function fn1(int maxCount) {
int count = 0;
while count < maxCount {
count = fn2(count);
}
fn3(count.toString());
}
function fn2(int i) => i + 1;
function fn3(string s) => print(s);
sequenceDiagram
loop count < maxCount
FN1->>FN2: int i
FN2-->>FN1: int
end
FN1->>FN3: string s
FN3-->>FN1: