Debian Codegraph @

tests/languages/groovy+sas/groovy_inclusion.test

raw
1 proc groovy classpath=cp;
2 /* Testing a comment */
3 submit parseonly;
4 class Speaker {
5 def say( word ) {
6 println "----> \"${word}\""
7 }
8 }
9 endsubmit;
10 quit;
11
12 proc groovy classpath=cp;
13 eval "s = new Speaker(); s.say( ""Hi"" )";
14 quit;
15
16 ----------------------------------------------------
17
18 [
19 ["step", "proc groovy"],
20 ["proc-args", [
21 ["arg", "classpath"],
22 ["operator", "="],
23 ["arg-value", "cp"],
24 ["punctuation", ";"]
25 ]],
26 ["proc-groovy", [
27 ["comment", "/* Testing a comment */"],
28
29 ["submit-statement", "submit parseonly"],
30 ["groovy", [
31 ["punctuation", ";"],
32
33 ["keyword", "class"],
34 ["class-name", ["Speaker"]],
35 ["punctuation", "{"],
36
37 ["keyword", "def"],
38 ["function", "say"],
39 ["punctuation", "("],
40 " word ",
41 ["punctuation", ")"],
42 ["punctuation", "{"],
43
44 "\r\n println ",
45 ["interpolation-string", [
46 ["string", "\"----> \\\""],
47 ["interpolation", [
48 ["interpolation-punctuation", "${"],
49 ["expression", ["word"]],
50 ["interpolation-punctuation", "}"]
51 ]],
52 ["string", "\\\"\""]
53 ]],
54
55 ["punctuation", "}"],
56
57 ["punctuation", "}"]
58 ]],
59 ["submit-statement", "endsubmit"],
60 ["punctuation", ";"]
61 ]],
62 ["step", "quit"],
63 ["punctuation", ";"],
64
65 ["step", "proc groovy"],
66 ["proc-args", [
67 ["arg", "classpath"],
68 ["operator", "="],
69 ["arg-value", "cp"],
70 ["punctuation", ";"]
71 ]],
72 ["proc-groovy", [
73 ["keyword", "eval"],
74 ["string", "\"s = new Speaker(); s.say( \"\"Hi\"\" )\""],
75 ["punctuation", ";"]
76 ]],
77 ["step", "quit"],
78 ["punctuation", ";"]
79 ]
80
81 ----------------------------------------------------
82
83 Checks for proc groovy support.