|
1 | 1 | comment(# simple method definitions)
|
2 | 2 |
|
3 |
| -reserved(def) method(method) ident(param1)operator(,) ident(param2) |
| 3 | +keyword(def) method(method) ident(param1)operator(,) ident(param2) |
4 | 4 | comment(# code)
|
5 |
| -reserved(end) |
| 5 | +keyword(end) |
6 | 6 |
|
7 |
| -reserved(def) method(method)operator(()ident(args)operator(,) operator(*)ident(rest)operator(,) operator(&)ident(block)operator(\)) |
| 7 | +keyword(def) method(method)operator(()ident(args)operator(,) operator(*)ident(rest)operator(,) operator(&)ident(block)operator(\)) |
8 | 8 | comment(# code)
|
9 |
| -reserved(end) |
| 9 | +keyword(end) |
10 | 10 |
|
11 |
| -reserved(def) |
| 11 | +keyword(def) |
12 | 12 | method(method)operator(()ident(param1)operator(,) ident(param2)operator(\))
|
13 | 13 | comment(# code)
|
14 |
| -reserved(end) |
| 14 | +keyword(end) |
15 | 15 |
|
16 |
| -reserved(def) \ |
| 16 | +keyword(def) \ |
17 | 17 | method(method)operator(()ident(param1)operator(,) ident(param2)operator(\))
|
18 | 18 | comment(# code)
|
19 |
| -reserved(end) |
| 19 | +keyword(end) |
20 | 20 |
|
21 |
| -reserved(def) comment(# comment) |
| 21 | +keyword(def) comment(# comment) |
22 | 22 | method(method)operator(()ident(param1)operator(,) ident(param2)operator(\))
|
23 | 23 | comment(# code)
|
24 |
| -reserved(end) |
| 24 | +keyword(end) |
25 | 25 |
|
26 |
| -reserved(def) method([])operator(;)reserved(end) |
27 |
| -reserved(def) method(def)operator(;)reserved(end) |
28 |
| -reserved(def) method(end?)operator(;)reserved(end) |
29 |
| -reserved(def) method(a)operator(()operator(*)operator(\)) reserved(end) |
30 |
| -reserved(def) method(!)operator(;) reserved(end) comment(# Ruby 1.9) |
| 26 | +keyword(def) method([])operator(;)keyword(end) |
| 27 | +keyword(def) method(def)operator(;)keyword(end) |
| 28 | +keyword(def) method(end?)operator(;)keyword(end) |
| 29 | +keyword(def) method(a)operator(()operator(*)operator(\)) keyword(end) |
| 30 | +keyword(def) method(!)operator(;) keyword(end) comment(# Ruby 1.9) |
31 | 31 |
|
32 | 32 |
|
33 | 33 | comment(# singleton methods)
|
34 | 34 |
|
35 |
| -reserved(def) constant(Class)operator(.)method(method) |
36 |
| -reserved(end) |
| 35 | +keyword(def) constant(Class)operator(.)method(method) |
| 36 | +keyword(end) |
37 | 37 |
|
38 |
| -reserved(def) predefined_constant(self)operator(.)method(method) |
39 |
| -reserved(end) |
| 38 | +keyword(def) predefined_constant(self)operator(.)method(method) |
| 39 | +keyword(end) |
40 | 40 |
|
41 |
| -reserved(def) ident(object)operator(.)method(method) |
42 |
| -reserved(end) |
| 41 | +keyword(def) ident(object)operator(.)method(method) |
| 42 | +keyword(end) |
43 | 43 |
|
44 |
| -reserved(def) ident(object)operator(.)method(Method) |
45 |
| -reserved(end) |
| 44 | +keyword(def) ident(object)operator(.)method(Method) |
| 45 | +keyword(end) |
46 | 46 |
|
47 |
| -reserved(def) global_variable($~)operator(.)method(method) |
48 |
| -reserved(end) |
| 47 | +keyword(def) global_variable($~)operator(.)method(method) |
| 48 | +keyword(end) |
49 | 49 |
|
50 |
| -reserved(def) predefined_constant(nil)operator(.)method(method) |
51 |
| -reserved(end) |
52 |
| -reserved(def) predefined_constant(true)operator(.)method(method) |
53 |
| -reserved(end) |
54 |
| -reserved(def) predefined_constant(false)operator(.)method(method) |
55 |
| -reserved(end) |
56 |
| -reserved(def) predefined_constant(__FILE__)operator(.)method(method) |
57 |
| -reserved(end) |
58 |
| -reserved(def) predefined_constant(__LINE__)operator(.)method(method) |
59 |
| -reserved(end) |
60 |
| -reserved(def) predefined_constant(__ENCODING__)operator(.)method(method) |
61 |
| -reserved(end) |
62 |
| -reserved(def) predefined_constant(__ENCODING__)operator(.)method(method) |
63 |
| -reserved(end) |
| 50 | +keyword(def) predefined_constant(nil)operator(.)method(method) |
| 51 | +keyword(end) |
| 52 | +keyword(def) predefined_constant(true)operator(.)method(method) |
| 53 | +keyword(end) |
| 54 | +keyword(def) predefined_constant(false)operator(.)method(method) |
| 55 | +keyword(end) |
| 56 | +keyword(def) predefined_constant(__FILE__)operator(.)method(method) |
| 57 | +keyword(end) |
| 58 | +keyword(def) predefined_constant(__LINE__)operator(.)method(method) |
| 59 | +keyword(end) |
| 60 | +keyword(def) predefined_constant(__ENCODING__)operator(.)method(method) |
| 61 | +keyword(end) |
| 62 | +keyword(def) predefined_constant(__ENCODING__)operator(.)method(method) |
| 63 | +keyword(end) |
64 | 64 |
|
65 |
| -reserved(def) instance_variable(@instance_variable)operator(.)method(method) |
66 |
| -reserved(end) |
| 65 | +keyword(def) instance_variable(@instance_variable)operator(.)method(method) |
| 66 | +keyword(end) |
67 | 67 |
|
68 |
| -reserved(def) instance_variable(@class_variable)operator(.)method(method) |
69 |
| -reserved(end) |
| 68 | +keyword(def) instance_variable(@class_variable)operator(.)method(method) |
| 69 | +keyword(end) |
70 | 70 |
|
71 |
| -reserved(def) operator(()constant(Module)operator(::)constant(Class)operator(\))operator(.)method(method) |
72 |
| -reserved(end) |
| 71 | +keyword(def) operator(()constant(Module)operator(::)constant(Class)operator(\))operator(.)method(method) |
| 72 | +keyword(end) |
73 | 73 |
|
74 |
| -reserved(def) operator(()ident(complex)operator(.)ident(expression)operator(\))operator(.)method(method) |
75 |
| -reserved(end) |
| 74 | +keyword(def) operator(()ident(complex)operator(.)ident(expression)operator(\))operator(.)method(method) |
| 75 | +keyword(end) |
76 | 76 |
|
77 |
| -reserved(def) operator(()ident(complex)operator(.)ident(expression) operator(+) ident(another)operator(()ident(complex)operator(()ident(expression)operator(\))operator(\))operator(\))operator(.)method(method) |
78 |
| -reserved(end) |
| 77 | +keyword(def) operator(()ident(complex)operator(.)ident(expression) operator(+) ident(another)operator(()ident(complex)operator(()ident(expression)operator(\))operator(\))operator(\))operator(.)method(method) |
| 78 | +keyword(end) |
79 | 79 |
|
80 | 80 |
|
81 | 81 | comment(# crazy)
|
82 | 82 |
|
83 |
| -reserved(def) operator(()reserved(class) class(Foo) |
84 |
| - reserved(def) method(initialize)operator(()ident(args)operator(\)) |
85 |
| - reserved(def) method(yet_another_method)operator(;) reserved(end) |
86 |
| - reserved(end) |
87 |
| -reserved(end)operator(\))operator(.)method(method)operator(()ident(args)operator(,) operator(*)ident(rest)operator(,) operator(&)ident(block)operator(\)) |
88 |
| -reserved(end) |
| 83 | +keyword(def) operator(()keyword(class) class(Foo) |
| 84 | + keyword(def) method(initialize)operator(()ident(args)operator(\)) |
| 85 | + keyword(def) method(yet_another_method)operator(;) keyword(end) |
| 86 | + keyword(end) |
| 87 | +keyword(end)operator(\))operator(.)method(method)operator(()ident(args)operator(,) operator(*)ident(rest)operator(,) operator(&)ident(block)operator(\)) |
| 88 | +keyword(end) |
89 | 89 |
|
90 | 90 | comment(# wrong)
|
91 |
| -reserved(def) ident(foo)operator(.)ident(bar)error(.)ident(quux) |
92 |
| -reserved(end) |
| 91 | +keyword(def) ident(foo)operator(.)ident(bar)error(.)ident(quux) |
| 92 | +keyword(end) |
0 commit comments