method var =
                  fun f ->
                    function
                    | "" -> pp f "$lid:\"\"$"
                    | "[]" -> pp f "[]"
                    | "()" -> pp f "()"
                    | " True" -> pp f "True"
                    | " False" -> pp f "False"
                    | v ->
                        (match lex_string v with
                         | LIDENT s | UIDENT s | ESCAPED_IDENT s when
                             is_keyword s -> pp f "%s__" s
                         | SYMBOL s -> pp f "( %s )" s
                         | LIDENT s | UIDENT s | ESCAPED_IDENT s ->
                             pp_print_string f s
                         | tok ->
                             failwith
                               (sprintf "Bad token used as an identifier: %s"
                                  (Token.to_string tok)))