Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jlchntoz/katana
Katana is a newly designed light-weight programming language
https://github.com/jlchntoz/katana
data-structures esolang interpreter programming-language
Last synced: about 2 months ago
JSON representation
Katana is a newly designed light-weight programming language
- Host: GitHub
- URL: https://github.com/jlchntoz/katana
- Owner: JLChnToZ
- License: mit
- Created: 2019-05-11T18:43:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-31T09:43:48.000Z (over 5 years ago)
- Last Synced: 2024-11-01T06:25:45.412Z (3 months ago)
- Topics: data-structures, esolang, interpreter, programming-language
- Language: C#
- Size: 104 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Katana
======
Katana is a newly-designed light-weight programming language and also a tree data structure expression. It aims to keep the parser simple, and highly inspired S-Expression, M-Expression and JSON format.The parser, encoder and runner in this repository is still in early development and not ready for use.
Example
-------
The language itself is look like this, somewhat looks like a mixture of LISP and JavaScript:
```
$(
function(factorial, (x), $(
=(c, 1),
=(y, 1),
while(<=(@(c), @(x)), $(
=(y, *(@(y), @(c))),
=(c, +(@(c), 1))
)),
return(@(y))
)),
print(Please enter the number),
readNumber(number),
=(number, 10),
=(result, factorial(@(number))),
print(format(factorial of %d: %d, @(number), @(result)))
)
```This expression can be used to represent a tree structure too:
```
root(
child(
another child,
hello!
),
3.1415,
false,
nil
)
```License
-------
[MIT](LICENSE)