@@ -114,13 +114,16 @@ def compile_node(root)
114
114
clazz = Object . const_get ( root . value )
115
115
116
116
-> ( node ) { node . is_a? ( clazz ) }
117
- elsif ConstPathRef === root and VarRef === root . parent and Const === root . parent . value and root . parent . value . value == "SyntaxTree"
117
+ elsif ConstPathRef === root and VarRef === root . parent and
118
+ Const === root . parent . value and
119
+ root . parent . value . value == "SyntaxTree"
118
120
compile_node ( root . constant )
119
121
elsif DynaSymbol === root and root . parts . empty?
120
122
symbol = :""
121
123
122
124
-> ( node ) { node == symbol }
123
- elsif DynaSymbol === root and parts = root . parts and parts . size == 1 and TStringContent === parts [ 0 ]
125
+ elsif DynaSymbol === root and parts = root . parts and parts . size == 1 and
126
+ TStringContent === parts [ 0 ]
124
127
symbol = parts [ 0 ] . value . to_sym
125
128
126
129
-> ( node ) { node == symbol }
@@ -129,7 +132,9 @@ def compile_node(root)
129
132
130
133
preprocessed =
131
134
root . keywords . to_h do |keyword , value |
132
- raise CompilationError , PP . pp ( root , +"" ) . chomp unless keyword . is_a? ( Label )
135
+ unless keyword . is_a? ( Label )
136
+ raise CompilationError , PP . pp ( root , +"" ) . chomp
137
+ end
133
138
[ keyword . value . chomp ( ":" ) . to_sym , compile_node ( value ) ]
134
139
end
135
140
@@ -146,13 +151,15 @@ def compile_node(root)
146
151
else
147
152
compiled_keywords
148
153
end
149
- elsif RegexpLiteral === root and parts = root . parts and parts . size == 1 and TStringContent === parts [ 0 ]
154
+ elsif RegexpLiteral === root and parts = root . parts and
155
+ parts . size == 1 and TStringContent === parts [ 0 ]
150
156
regexp = /#{ parts [ 0 ] . value } /
151
157
152
158
-> ( attribute ) { regexp . match? ( attribute ) }
153
159
elsif StringLiteral === root and root . parts . empty?
154
160
-> ( attribute ) { attribute == "" }
155
- elsif StringLiteral === root and parts = root . parts and parts . size == 1 and TStringContent === parts [ 0 ]
161
+ elsif StringLiteral === root and parts = root . parts and
162
+ parts . size == 1 and TStringContent === parts [ 0 ]
156
163
value = parts [ 0 ] . value
157
164
-> ( attribute ) { attribute == value }
158
165
elsif SymbolLiteral === root
0 commit comments