Simple language inspired by scheme
file.sl:
[println "Hello World"]
cli:
> slang file.sl
Hello World
- Runing builtin functions
- Comments
- add runtime errors
- add basic aritmetic functions (+, -, *, /, %)
- add lazy evaluation
- add
if
function - ability to set variables
- ability to create functions
- add
do
function - local set
- ability to create structures
- pointers
- ability to create function signatures
- ability to import another file
- llvm based compiler
print
prints its arguments to the screenprintln
prints its arguments to the screen and appends newline+
sums variable number of arguments of type bool, int or float-
negates single argument or subtracts second argument from the first (works with bool, int and float)*
multiplies variable number of arguments of type bool, int or float/
divides the first argument by the second argument (works with int and float)%
performs a modulo with two int arguments
(in string and char literals)
\0
null character\n
newline\r
carrige return\t
tab\x
hex char- there is no length limit
\xhello
followed by no hex character is same ashello
\x68656c6c6f
is same ashello
- sequence can by optionally ended with
;
\x68656c6c;6f
is same ashell6f
- any other character directly following
\
is interpreted literally- it is not recommended to use this for other characters than
\'
,\"
and\\
(new escape sequences may be added later)
- it is not recommended to use this for other characters than
- use
//
for line comments - use
/* */
for block comments (/*/
is valid block comment)