   def compile_term([{:keyword, "true"}]), do: ["push constant -1"]
   def compile_term([{:keyword, "false"}]), do: ["push constant 0"]
   
-  def compile_term([{:identifier, var_name, :attr, %{kind: kind, index: index}}]) do
+  def compile_term([{:identifier, _var_name, :attr, %{kind: kind, index: index}}]) do
     ["push #{segment_of(kind)} #{index}"]
   end
   

      List.keymember?([tup], :expression, 0)
    end) |> length()
  end
  
  # def number_of_parameters(param_list) do
  #   Enum.filter(param_list, fn (tup) ->
  #     List.keymember?([tup], :identifier, 0)
  #   end) |> length()
  # end

  def number_of_locals(subroutine_body) do
    Enum.filter(subroutine_body, fn(tup) ->


  def compile_subroutine_dec(class_name,
        [{:keyword, "function"},
         {keyword_or_identifier, _return_type},
         {:identifier, fn_name, :attr, _},
         {:symbol, "("},
         {:parameterList, param_list},
         {:symbol, ")"},
         {:subroutineBody, body_parsed}])
  when keyword_or_identifier in [:keyword, :identifier] do
    body_vm = compile_subroutine_body(body_parsed)
    ["function #{class_name}.#{fn_name} #{number_of_locals(param_list)}"]
    ++ body_vm
