Templit runs on 3 simple mechanisms
- Data
- Hooks
- Functions
Nothing Else!!!
Strict implicit typing and garbage collection
I'm not handling most of that complex stuff. Python will do most of the heavy lifting so I can focus on parsing, lexing and interpreting. I might do more complex stuff later
- String: "foo"
- Float: 1.23
- Integer: 123
- Boolean: true, false
runs with the compile signal it triggers every compile hook, if it runs
with the update hook it executes all update hooks e.t.c. They look like
this {{hook::...}}
- Functions: Like in most other language. They must always return a value, Functions are created and used like this
# Create a funtion
adder(a, b) {
concat(a, "+", b, "=", sum(1, b));
}
# Call a function
adder(10, 15)