AkaiLang/syntax.akai
2025-08-05 17:17:11 +02:00

46 lines
580 B
Text

class Position:
// Properties
var int: x
var int: y
// Constructor
Position(_x, _y) {
x = _x
y = _y
}
// Inheritance
class Cat derive Animal:
/*
code goes here
*/
fun helloWorld() {
// Variables either dynamically or statically typed
var String: test = "I'm a string"
var foo = 12
var bar = foo + 10
print("Hello World " + bar)
}
/*
Keywords/ Tokens:
- class
- fun
- var
- bool
- if
- else
- (
- )
- {
- }
- :
- +
- -
- /
- *
- =
*/