logos calculator example

This commit is contained in:
LunarAkai 2025-08-05 17:17:11 +02:00
commit 0c30f0022d
9 changed files with 414 additions and 22 deletions

View file

@ -1,3 +1,20 @@
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"
@ -6,4 +23,24 @@ fun helloWorld() {
var bar = foo + 10
print("Hello World " + bar)
}
}
/*
Keywords/ Tokens:
- class
- fun
- var
- bool
- if
- else
- (
- )
- {
- }
- :
- +
- -
- /
- *
- =
*/