summaryrefslogtreecommitdiff
path: root/test/scanners/ruby/def.expected.raydebug
blob: 9d6ac01ada14bfb2f35f75d361e85bad2b757451 (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
comment(# simple method definitions)

reserved(def) method(method) ident(param1)operator(,) ident(param2)
  comment(# code)
reserved(end)

reserved(def) method(method)operator(()ident(args)operator(,) operator(*)ident(rest)operator(,) operator(&)ident(block)operator(\))
  comment(# code)
reserved(end)

reserved(def)
method(method)operator(()ident(param1)operator(,) ident(param2)operator(\))
  comment(# code)
reserved(end)

reserved(def) \
method(method)operator(()ident(param1)operator(,) ident(param2)operator(\))
  comment(# code)
reserved(end)

reserved(def) comment(# comment)
method(method)operator(()ident(param1)operator(,) ident(param2)operator(\))
  comment(# code)
reserved(end)

reserved(def) method([])operator(;)reserved(end)
reserved(def) method(def)operator(;)reserved(end)
reserved(def) method(end?)operator(;)reserved(end)
reserved(def) method(a)operator(()operator(*)operator(\)) reserved(end)
reserved(def) method(!)operator(;) reserved(end)  comment(# Ruby 1.9)


comment(# singleton methods)

reserved(def) constant(Class)operator(.)method(method)
reserved(end)

reserved(def) pre_constant(self)operator(.)method(method)
reserved(end)

reserved(def) ident(object)operator(.)method(method)
reserved(end)

reserved(def) ident(object)operator(.)method(Method)
reserved(end)

reserved(def) global_variable($~)operator(.)method(method)
reserved(end)

reserved(def) pre_constant(nil)operator(.)method(method)
reserved(end)
reserved(def) pre_constant(true)operator(.)method(method)
reserved(end)
reserved(def) pre_constant(false)operator(.)method(method)
reserved(end)
reserved(def) pre_constant(__FILE__)operator(.)method(method)
reserved(end)
reserved(def) pre_constant(__LINE__)operator(.)method(method)
reserved(end)
reserved(def) pre_constant(__ENCODING__)operator(.)method(method)
reserved(end)
reserved(def) pre_constant(__ENCODING__)operator(.)method(method)
reserved(end)

reserved(def) instance_variable(@instance_variable)operator(.)method(method)
reserved(end)

reserved(def) instance_variable(@class_variable)operator(.)method(method)
reserved(end)

reserved(def) operator(()constant(Module)operator(::)constant(Class)operator(\))operator(.)method(method)
reserved(end)

reserved(def) operator(()ident(complex)operator(.)ident(expression)operator(\))operator(.)method(method)
reserved(end)

reserved(def) operator(()ident(complex)operator(.)ident(expression) operator(+) ident(another)operator(()ident(complex)operator(()ident(expression)operator(\))operator(\))operator(\))operator(.)method(method)
reserved(end)


comment(# crazy)

reserved(def) operator(()reserved(class) class(Foo)
  reserved(def) method(initialize)operator(()ident(args)operator(\))
    reserved(def) method(yet_another_method)operator(;) reserved(end)
  reserved(end)
reserved(end)operator(\))operator(.)method(method)operator(()ident(args)operator(,) operator(*)ident(rest)operator(,) operator(&)ident(block)operator(\))
reserved(end)

comment(# wrong)
reserved(def) ident(foo)operator(.)ident(bar)error(.)ident(quux)
reserved(end)