from tree_sitter_java import language as java_language  # noqa: F401

java_mapping: dict[str, str] = {
    "block_comment": "Comment",
    "line_comment": "Comment",
    "assert": "Keyword",
    "boolean": "Keyword",
    "boolean_type": "Keyword",
    "byte": "Keyword",
    "catch": "Keyword",
    "char": "Keyword",
    "class": "Keyword",
    "do": "Keyword",
    "double": "Keyword",
    "else": "Keyword",
    "extends": "Keyword",
    "false": "Keyword",
    "final": "Keyword",
    "float": "Keyword",
    "for": "Keyword",
    "if": "Keyword",
    "implements": "Keyword",
    "import": "Keyword",
    "int": "Keyword",
    "interface": "Keyword",
    "long": "Keyword",
    "new": "Keyword",
    "null_literal": "Keyword",
    "package": "Keyword",
    "private": "Keyword",
    "protected": "Keyword",
    "public": "Keyword",
    "return": "Keyword",
    "short": "Keyword",
    "static": "Keyword",
    "super": "Keyword",
    "this": "Keyword",
    "throw": "Keyword",
    "throws": "Keyword",
    "true": "Keyword",
    "try": "Keyword",
    "void_type": "Keyword",
    "while": "Keyword",
    "identifier": "Name",
    "type_identifier": "Name",
    "decimal_floating_point_literal": "Number",
    "decimal_integer_literal": "Number",
    "!": "Operator",
    "!=": "Operator",
    "%": "Operator",
    "&&": "Operator",
    "*": "Operator",
    "*=": "Operator",
    "+": "Operator",
    "++": "Operator",
    "+=": "Operator",
    "-": "Operator",
    "--": "Operator",
    "-=": "Operator",
    "/": "Operator",
    "/=": "Operator",
    "<": "Operator",
    "<=": "Operator",
    "=": "Operator",
    "==": "Operator",
    ">": "Operator",
    ">=": "Operator",
    "?": "Operator",
    "||": "Operator",
    "(": "Punctuation",
    ")": "Punctuation",
    ",": "Punctuation",
    ".": "Punctuation",
    ":": "Punctuation",
    ";": "Punctuation",
    "[": "Punctuation",
    "]": "Punctuation",
    "{": "Punctuation",
    "}": "Punctuation",
    '"': "String",
    "character_literal": "String",
    "escape_sequence": "String",
    "string_fragment": "String",
}


# print(
#     {
#         k: v
#         for k, v in sorted(
#             java_mapping.items(), key=lambda item: (item[1], item)
#         )
#     }
# )
