Permalink
Browse files

- Fix for sexp structure changes (no arglists).

[git-p4: depot-paths = "//src/flog/dev/": change = 7696]
  • Loading branch information...
zenspider committed Aug 1, 2012
1 parent 1faf5cb commit 31c1dfd2e5d33847785cbbece0001011fc7c605e
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/flog.rb
View
@@ -645,11 +645,11 @@ def process_iter(exp)
recv = exp.first
# DSL w/ names. eg task :name do ... end
- if (recv[0] == :call and recv[1] == nil and recv.arglist[1] and
- [:lit, :str].include? recv.arglist[1][0]) then
- msg = recv[2]
- submsg = recv.arglist[1][1]
- in_klass msg do # :task
+ # looks like s(:call, nil, :task, s(:lit, :name))
+ t, r, m, a = recv
+ if (t == :call and r == nil and a and [:lit, :str].include? a[0]) then
+ submsg = a[1]
+ in_klass m do # :task
in_method submsg, exp.file, exp.line do # :name
process_until_empty exp
end
@@ -660,7 +660,7 @@ def process_iter(exp)
add_to_score :branch
- exp.delete 0 # TODO: what is this?
+ exp.delete 0 # { || ... } has 0 in arg slot
process exp.shift # no penalty for LHS

0 comments on commit 31c1dfd

Please sign in to comment.