Class: Wool::SexpAnalysis::ParentAnnotation::Annotator

Inherits:
Object
  • Object
show all
Defined in:
lib/wool/analysis/annotations/parent_annotation.rb

Overview

This is the annotator for the parent annotation.

Instance Method Summary collapse

Instance Method Details

#annotate!(root) ⇒ Object



12
13
14
15
# File 'lib/wool/analysis/annotations/parent_annotation.rb', line 12

def annotate!(root)
  root.parent = nil
  root.children.select {|x| SexpAnalysis::Sexp === x}.each {|sexp| sexp.parent = root}
end