<commit_before>name: 'Kotlin'
scopeName: 'source.kotlin'
type: 'tree-sitter'
parser: 'tree-sitter-kotlin'

fileTypes: ['kt', 'kts']

comments:
	start: '// '

scopes:
	'source_file': 'source.kotlin'
	'''
		"if",
		"else",
		"while",
		"do",
		"when",
		"try",
		"throw",
		"break",
		"continue",
		"return",
		"for"
	''': 'keyword.control.kotlin'
	'''
		"catch",
		"finally",
		"field"
	''': 'keyword.soft.kotlin'
	'''
		"as",
		"typeof",
		"is",
		"in"
	''': 'keyword.hard.kotlin'
	'''
		"abstract",
		"final",
		"enum",
		"open",
		"annotation",
		"sealed",
		"data",
		"override",
		"final",
		"lateinit",
		"private",
		"protected",
		"public",
		"internal",
		"inner",
		"companion",
		"noinline",
		"crossinline",
		"vararg",
		"reified",
		"tailrec",
		"operator",
		"infix",
		"inline",
		"external",
		"const",
		"suspend"
	''': 'storage.modifier.other.kotlin'
	'"fun"': 'storage.type.function.kotlin'
	'"object"': 'storage.type.object.kotlin'
	'"class"': 'storage.type.class.kotlin'
	'"typealias"': 'storage.type.alias.kotlin'
	'''
		"val",
		"var"
	''': 'storage.type.variable.kotlin'
	'''
		"++",
		"--",
		".",
		"?.",
		"?"
	''': 'keyword.operator.postfix.kotlin'
	'"!"': 'keyword.operator.prefix.kotlin'
	'":"': 'keyword.operator.typerhs.kotlin'
	'''
		"*",
		"/",
		"%"
	''': 'keyword.operator.multiplicative.kotlin'
	'''
		"+",
		"-"
	''': 'keyword.operator.additive.kotlin'
	'".."': 'keyword.operator.range.kotlin'
	'"?:"': 'keyword.operator.elvis.kotlin'
	'''
		"<",
		">",
		"<=",
		">="
	''': 'keyword.operator.comparison.kotlin'
	'''
		"==",
		"!=",
		"===",
		"!=="
	''': 'keyword.operator.equality.kotlin'
	'"&&"': 'keyword.operator.conjunction.kotlin'
	'"||"': 'keyword.operator.disjunction.kotlin'
	'''
		"=",
		"+=",
		"-=",
		"*=",
		"/=",
		"%="
	''': 'keyword.operator.assignment.kotlin'<commit_msg>Map variable and function declarations in the Tree-Sitter grammar<commit_after>name: 'Kotlin'
scopeName: 'source.kotlin'
type: 'tree-sitter'
parser: 'tree-sitter-kotlin'

fileTypes: ['kt', 'kts']

comments:
	start: '// '

scopes:
	'source_file': 'source.kotlin'
	'''
		"if",
		"else",
		"while",
		"do",
		"when",
		"try",
		"throw",
		"break",
		"continue",
		"return",
		"for"
	''': 'keyword.control.kotlin'
	'''
		"catch",
		"finally",
		"field"
	''': 'keyword.soft.kotlin'
	'''
		"as",
		"typeof",
		"is",
		"in"
	''': 'keyword.hard.kotlin'
	'''
		"abstract",
		"final",
		"enum",
		"open",
		"annotation",
		"sealed",
		"data",
		"override",
		"final",
		"lateinit",
		"private",
		"protected",
		"public",
		"internal",
		"inner",
		"companion",
		"noinline",
		"crossinline",
		"vararg",
		"reified",
		"tailrec",
		"operator",
		"infix",
		"inline",
		"external",
		"const",
		"suspend"
	''': 'storage.modifier.other.kotlin'
	'"fun"': 'storage.type.function.kotlin'
	'"object"': 'storage.type.object.kotlin'
	'"class"': 'storage.type.class.kotlin'
	'"typealias"': 'storage.type.alias.kotlin'
	'''
		"val",
		"var"
	''': 'storage.type.variable.kotlin'
	'''
		"++",
		"--",
		".",
		"?.",
		"?"
	''': 'keyword.operator.postfix.kotlin'
	'"!"': 'keyword.operator.prefix.kotlin'
	'":"': 'keyword.operator.typerhs.kotlin'
	'''
		"*",
		"/",
		"%"
	''': 'keyword.operator.multiplicative.kotlin'
	'''
		"+",
		"-"
	''': 'keyword.operator.additive.kotlin'
	'".."': 'keyword.operator.range.kotlin'
	'"?:"': 'keyword.operator.elvis.kotlin'
	'''
		"<",
		">",
		"<=",
		">="
	''': 'keyword.operator.comparison.kotlin'
	'''
		"==",
		"!=",
		"===",
		"!=="
	''': 'keyword.operator.equality.kotlin'
	'"&&"': 'keyword.operator.conjunction.kotlin'
	'"||"': 'keyword.operator.disjunction.kotlin'
	'''
		"=",
		"+=",
		"-=",
		"*=",
		"/=",
		"%="
	''': 'keyword.operator.assignment.kotlin'
	'type_identifier': 'entity.name.type'
	'function_declaration > simple_identifier': 'entity.name.function'
	'variable_declaration > simple_identifier': 'variable'
{'fraction_non_alphanumeric': 0.27486437613019893, 'fraction_numerical': 0.0, 'mean_word_length': 3.7161997563946407, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2484227', 'n_tokens_mistral': 1860, 'n_tokens_neox': 1657, 'n_words': 191}