diff --git a/web/thesauruses/kotlin/1.5/control_structures.json b/web/thesauruses/kotlin/1.5/control_structures.json new file mode 100644 index 000000000..2fd4ebe0e --- /dev/null +++ b/web/thesauruses/kotlin/1.5/control_structures.json @@ -0,0 +1,51 @@ +{ + "meta": { + "language": "kotlin", + "language_name": "Kotlin", + "structure": "control_structures", + "language_version": "1.5" + }, + "concepts": { + "if_conditional": { + "name": "If conditional", + "code": "if (condition) {\n // statements\n}" + }, + "if_else_conditional": { + "name": "If/Else conditional", + "code": "if (condition) {\n // statements\n} else {\n // statements\n}" + }, + "if_elseif_conditional": { + "name": "If/ElseIf conditional", + "code": "if (condition) {\n // statements\n} else if (condition) {\n // statements\n}" + }, + "if_elseif_else_conditional": { + "name": "If/ElseIf/Else conditional", + "code": "if (condition) {\n // statements\n} else if (condition) {\n // statements\n} else {\n // statements\n}" + }, + "ternary_conditional": { + "name": "Ternary conditional", + "code": "val result = if (condition) valueIfTrue else valueIfFalse" + }, + "switch_statement": { + "name": "Switch statement", + "code": "when (expression) {\n value1 -> {\n // statements\n }\n value2 -> {\n // statements\n }\n else -> {\n // statements\n }\n}" + }, + "while_loop": { + "name": "While loop", + "code": "while (condition) {\n // statements\n}" + }, + "do_while_loop": { + "name": "Do/While loop", + "code": "do {\n // statements\n} while (condition)" + }, + "for_loop": { + "name": "For loop", + "code": "for (item in collection) {\n // statements\n}" + }, + "foreach_loop": { + "name": "Foreach loop", + "code": "collection.forEach { item ->\n // statements\n}" + } + } + } + \ No newline at end of file diff --git a/web/thesauruses/kotlin/1.5/data_types.json b/web/thesauruses/kotlin/1.5/data_types.json new file mode 100644 index 000000000..1c2b0ce27 --- /dev/null +++ b/web/thesauruses/kotlin/1.5/data_types.json @@ -0,0 +1,71 @@ +{ + "meta": { + "language": "kotlin", + "language_name": "Kotlin", + "structure": "data_types", + "language_version": "1.5" + }, + "concepts": { + "boolean": { + "name": "Boolean", + "code": "Boolean" + }, + "signed_integer_8_bit": { + "name": "Signed 8-bit integer", + "code": "Byte" + }, + "signed_integer_16_bit": { + "name": "Signed 16-bit integer", + "code": "Short" + }, + "signed_integer_32_bit": { + "name": "Signed 32-bit integer", + "code": "Int" + }, + "signed_integer_64_bit": { + "name": "Signed 64-bit integer", + "code": "Long" + }, + "signed_integer_as_object": { + "name": "Signed object-based Integer", + "code": "Int" + }, + "signed_float_16_bit": { + "name": "Signed 16-bit floating point", + "not-implemented": true + }, + "signed_float_32_bit": { + "name": "Signed 32-bit floating point", + "code": "Float" + }, + "signed_float_64_bit": { + "name": "Signed 64-bit floating point", + "code": "Double" + }, + "signed_float_as_object": { + "name": "Signed object-based floating point", + "code": "Float" + }, + "string_as_object": { + "name": "String as an object", + "code": "String" + }, + "string_as_array": { + "name": "String as an array of characters", + "code": "CharArray" + }, + "complex_as_object": { + "name": "Complex Number as an object", + "not-implemented": true + }, + "real_number_part": { + "name": "Complex number real part", + "not-implemented": true + }, + "imaginary_number_part": { + "name": "Complex number imaginary part", + "not-implemented": true + } + } + } + \ No newline at end of file