-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #692 from PentW0lf/main
Added data types in Lua
- Loading branch information
Showing
1 changed file
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{ | ||
"meta": { | ||
"language": "lua", | ||
"language_name": "Lua", | ||
"structure": "data_types", | ||
"language_version": "5.1" | ||
}, | ||
"concepts": { | ||
"boolean": { | ||
"name": "Boolean", | ||
"not-implemented": true, | ||
"comment": "The type boolean has two values, false and true and both nil and false make a condition false." | ||
}, | ||
"signed_integer_8_bit": { | ||
"name": "Signed 8-bit integer", | ||
"not-implemented": true | ||
}, | ||
"unsigned_integer_8_bit": { | ||
"name": "Unsigned 8-bit integer", | ||
"not-implemented": true | ||
}, | ||
"signed_integer_16_bit": { | ||
"name": "Signed 16-bit integer", | ||
"not-implemented": true | ||
}, | ||
"unsigned_integer_16_bit": { | ||
"name": "Unsigned 16-bit integer", | ||
"not-implemented": true | ||
}, | ||
"signed_integer_32_bit": { | ||
"name": "Signed 32-bit integer", | ||
"not-implemented": true | ||
}, | ||
"unsigned_integer_32_bit": { | ||
"name": "Unsigned 32-bit integer", | ||
"not-implemented": true | ||
}, | ||
"signed_integer_64_bit": { | ||
"name": "Signed 64-bit integer", | ||
"not-implemented": true | ||
}, | ||
"unsigned_integer_64_bit": { | ||
"name": "Unsigned 64-bit integer", | ||
"not-implemented": true | ||
}, | ||
"signed_integer_as_object": { | ||
"name": "Signed object-based Integer", | ||
"not-implemented": true, | ||
"comment":"Lua does not have a built-in concept of distinct signed, object-based integers with the full range of operations and methods that you might find in languages like C++ or Java." | ||
}, | ||
"unsigned_integer_as_object": { | ||
"name": "Unsigned object-based Integer", | ||
"not-implemented": true | ||
}, | ||
"signed_float_16_bit": { | ||
"name": "Signed 16-bit floating point", | ||
"not-implemented": true | ||
}, | ||
"unsigned_float_16_bit": { | ||
"name": "Unsigned 16-bit floating point", | ||
"not-implemented": true | ||
}, | ||
"signed_float_32_bit": { | ||
"name": "Signed 32-bit floating point", | ||
"not-implemented": true | ||
}, | ||
"unsigned_float_32_bit": { | ||
"name": "Unsigned 32-bit floating point", | ||
"not-implemented": true | ||
}, | ||
"signed_float_64_bit": { | ||
"name": "Signed 64-bit floating point", | ||
"not-implemented": true | ||
}, | ||
"unsigned_float_64_bit": { | ||
"name": "Unsigned 64-bit floating point", | ||
"not-implemented": true | ||
}, | ||
"signed_float_as_object": { | ||
"name": "Signed object-based floating point", | ||
"not-implemented": true, | ||
"comment":"Same as integer applies here too." | ||
}, | ||
"unsigned_float_as_object": { | ||
"name": "Unsigned object-based floating point", | ||
"not-implemented": true | ||
}, | ||
"character": { | ||
"name": "Character", | ||
"not-implemented": true | ||
}, | ||
"string_as_object": { | ||
"name": "String as an object", | ||
"not-implemented": true, | ||
"comment":"In Lua, strings are not treated as objects in the same way that some other programming languages, like Python or JavaScript" | ||
}, | ||
"string_as_array": { | ||
"name": "String as an array of characters", | ||
"code": | ||
[ | ||
"local myString = 'Hello, World!'\nlocal firstChar = myString:sub(1, 1) -- Access the first character\nlocal fifthChar = myString:sub(5, 5) -- Access the fifth character\nprint(firstChar) -- Output: 'H'\nprint(fifthChar) -- Output: 'o'" | ||
], | ||
"comment":"In Lua, strings are treated as arrays of characters." | ||
}, | ||
"complex_as_object": { | ||
"name": "Complex Number as an object", | ||
"not-implemented": true, | ||
"comment":"Lua does not have built-in support for complex numbers as a distinct data type like some other languages, such as Python." | ||
|
||
}, | ||
"real_number_part": { | ||
"name": "Complex number real part", | ||
"not-implemented": true | ||
}, | ||
"imaginary_number_part": { | ||
"name": "Complex number imaginary part", | ||
"not-implemented": true | ||
} | ||
} | ||
} |