Monday 16 September 2019

Programming language syntax draft

" Namaste " : Prints Namaste with newline (like puts)
' Aur Sunao ' : Prints Aur Sunao without newline (like print)
( ) : For condition :: ((5>6){"yes"})(rethink)
( ) ? true : false :: (if else)
{ } : Block (write statements in it)
/* */ : multiline comments
=> : (not assigned yet) maybe (return)
<= : (not assigned yet) maybe (assignment)
+ : Add
- : Sub
* : Mul
/ : Div
== (equal?)
!= (not equal)
<, <= : (lessThan, equalTo)
>, >= : (greaterThan, equalTo)
&& : (AND)
|| : (OR)
! : (NOT)
& : (bit AND)
| : (bit OR)
^ : (XOR)
>> : (right shift)<< : (left shift)
() => {} : (switch case) ((var =7) 7=> {"is 7"}
~: (infinity)
 <varName> : (string interpolation)
@ : (import modules)(installed)
# : (include local files)
[Title of Link]`linkUrl` : (add url)(what for?)
varName[9] : (array)

i8, i16, i32, i64 : (int and bytes)
f32, f64 : (floats)
varName Str (the type is string)
varName Char (type is char)
auto : (based on the value returned by function)
fn Name() : (function declaration)

0 Comments:

Post a Comment