cruz-lang
·127 words·1 min
Cruzlang #
Cruz Lang is a simple explicit static typed language.
The compiler written in python is called shark and uses ply.lex for lexical analysis.
It has 5 primitive data types:
Data types #
byte
one byte of datachar
one ASCII characterint
a 32 bit integerprec
a number with a decimal point of 4 bytesptr
a 4 byte pointer address
Other key words #
fun
the function key wordwhile
a while loopwrite
output as stdoutread
input as stdinwith
uses external filesif
do something if condition trueelif
else do something if condition trueelse
else do somethingtakes
place for parameters and typesreturn
a returnreturns
tells function what type to return
Here is the syntax:
Syntax