anchor.diff:  let internal ct (o:obj) =
     o :?> CommonTree
   
  +//
   let private child o n =
     (ct (ct o).Children.[n])
   
  +//
   let private addLocal (s:Scopes) (n:string) =
     match s with
     | [] -> failwith EmptyScopeChain
     | x::[] -> s
     | x::xs -> {x with Locals = (Map.add n emptyLocal x.Locals)} :: xs
   
  +//
   let private addLocals (s:Scopes) (ns:string list) =
     match s with 
     | [] -> failwith EmptyScopeChain
  
positive.code:       let found, scopes = findLocal s
        (if found then Closure(n) else Global(n)), scopes
  
  let private makeBlock ts s p =
    let scopes = ref s
    Block([for c in ts -> getAst scopes (p (ct c) !scopes)]), !scopes
  
  let private cleanString = function
    | "" -> ""
    | s  -> if s.[0] = '"' then s.Trim('"') else s.Trim('\'')
  
  let private exprType = function
    | Number(Integer(_)) -> Types.JsTypes.Integer
    | Number(Double(_)) -> Types.JsTypes.Double
    | String(_) -> Types.JsTypes.String
    | _ -> Types.JsTypes.Dynamic
  
  let private addTypeData (s:Scopes) a b =
    match s with
    | [] -> failwith EmptyScopeChain
  
negative.code:       { x with Locals = Map.add a_name modified x.Locals } :: xs
      | _ -> s
  
  //
  let private forEachChild (func:CommonTree -> 'a) (tree:CommonTree) =
    match tree.Children with
    | null -> []
    | _    -> [for child in tree.Children -> func (ct child)]
  
  //
  let private genChildren gen (tree:CommonTree) (scopes:Scopes ref) =
    [for child in tree.Children -> getAst scopes (gen (ct child) !scopes)]
  
  