nitlight: add --txt for text-based highlighting
[nit.git] / tests / sav / nitlight_args4.res
1 \e[34m# This file is part of NIT ( http://www.nitlanguage.org ).
2 \e[m\e[34m#
3 \e[m\e[34m# Copyright 2006-2008 Jean Privat <jean@pryen.org>
4 \e[m\e[34m#
5 \e[m\e[34m# Licensed under the Apache License, Version 2.0 (the "License");
6 \e[m\e[34m# you may not use this file except in compliance with the License.
7 \e[m\e[34m# You may obtain a copy of the License at
8 \e[m\e[34m#
9 \e[m\e[34m#     http://www.apache.org/licenses/LICENSE-2.0
10 \e[m\e[34m#
11 \e[m\e[34m# Unless required by applicable law or agreed to in writing, software
12 \e[m\e[34m# distributed under the License is distributed on an "AS IS" BASIS,
13 \e[m\e[34m# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 \e[m\e[34m# See the License for the specific language governing permissions and
15 \e[m\e[34m# limitations under the License.
16 \e[m
17 \e[33mimport\e[m \e[33mend\e[m
18
19 \e[33minterface\e[m \e[32mObject\e[m
20 \e[33mend\e[m
21
22 \e[33menum\e[m \e[32mBool\e[m
23 \e[33mend\e[m
24
25 \e[33menum\e[m \e[32mInt\e[m
26         \e[33mfun\e[m output \e[33mis\e[m intern
27 \e[33mend\e[m
28
29 \e[33mclass\e[m \e[32mA\e[m
30         \e[33minit\e[m \e[33mdo\e[m \e[31m5\e[m.output
31         \e[33mfun\e[m run \e[33mdo\e[m \e[31m6\e[m.output
32 \e[33mend\e[m
33
34 \e[33mclass\e[m \e[32mB\e[m
35         \e[33mvar\e[m val: \e[32mInt\e[m
36         \e[33minit\e[m(v: \e[32mInt\e[m)
37         \e[33mdo\e[m
38                 \e[31m7\e[m.output
39                 \e[33mself\e[m.val = v
40         \e[33mend\e[m
41         \e[33mfun\e[m run \e[33mdo\e[m val.output
42 \e[33mend\e[m
43
44 \e[33mclass\e[m \e[32mC\e[m
45         \e[33mvar\e[m val1: \e[32mInt\e[m
46         \e[33mvar\e[m val2: \e[32mInt\e[m = \e[31m10\e[m
47 \e[33mend\e[m
48
49 \e[33mfun\e[m foo \e[33mdo\e[m \e[31m2\e[m.output
50 \e[33mfun\e[m bar(i: \e[32mInt\e[m) \e[33mdo\e[m i.output
51 \e[33mfun\e[m baz: \e[32mInt\e[m \e[33mdo\e[m \e[33mreturn\e[m \e[31m4\e[m
52
53 \e[31m1\e[m.output
54 foo
55 bar(\e[31m3\e[m)
56 baz.output
57
58 \e[33mvar\e[m a = \e[33mnew\e[m \e[32mA\e[m
59 a.run
60
61 \e[33mvar\e[m b = \e[33mnew\e[m \e[32mB\e[m(\e[31m8\e[m)
62 b.run
63
64 \e[33mvar\e[m c = \e[33mnew\e[m \e[32mC\e[m(\e[31m9\e[m)
65 c.val1.output
66 c.val2.output