We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 348d03b commit d23e111Copy full SHA for d23e111
tools/ripper.rb
@@ -21,18 +21,20 @@ def on_parse_error msg
21
ARGV.each do |path|
22
src = path == "-" ? $stdin.read : File.read(path)
23
24
- sexp = if $b then
25
- Ripper.sexp src
26
- else
27
- rip = MySexpBuilder.new src
28
- rip.yydebug = $d
29
- rip.parse
30
-
31
- if rip.error? then
32
- warn "skipping"
33
- next
34
- end
35
+ sexp = nil
+
+ if $b then
+ sexp = Ripper.sexp src
+ else
+ rip = MySexpBuilder.new src
+ rip.yydebug = $d
+ sexp = rip.parse
+ if rip.error? then
+ warn "skipping"
+ next
36
+ end
37
38
39
puts "accept"
40
0 commit comments