File: basic_proc_err2.signalling

package info (click to toggle)
msc-generator 8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 180,648 kB
  • sloc: cpp: 133,265; yacc: 23,546; ansic: 7,210; sh: 4,512; lex: 2,028; makefile: 1,085
file content (29 lines) | stat: -rw-r--r-- 866 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
defproc export($style, $color) [export=yes] {  #test if styles are actually exported
    defstyle $style [line.color=$color, text.color=$color, arrow.color=$color];
};

defproc aaa ($aaa=gray, $bb="default \c(gray)gray\c()\nlabel") {
    replay export(param, $aaa);
    a->b [param, label=$bb];
};
defproc bbb ($aaa, $bb) {
    defproc ccc ($aaa, $bb) { #should result in error
        a>>b [color=$aaa, label=$dd];  #$dd is a bad label
    };
    a=>b [arrow, color=$aaa, label=$bb];
};

defproc inserting($txt, $color) {
    replay aaa($color, "\b\Q($txt)\n\blabel");
};


replay aaa;
defcolor gray=lgray;
replay aaa; #default parameter interpreted at the call site
replay aaa(red, "\bred\n\blabel");
replay aaa(blue, "\bblue\n\blabel");

replay inserting(greenish, green);
replay inserting(green, greenish); #should result in errors