Toit is a programming language created in 2021 by Florian Loitsch and Kasper Lund.
#1538on PLDB | 4Years Old |
git clone https://github.com/toitlang/toit
Toit is a modern high-level language designed specifically for microcontrollers.
hi:
print "Hello World!"
greet name:
print "Hello $name!"
main:
hi
greet "Kasper"
Feature | Supported | Example | Token |
---|---|---|---|
Conditionals | ✓ | ||
Strings | ✓ | "Hello" | |
File Imports | ✓ | import .library import library import library show * | |
While Loops | ✓ | while condition: | |
Increment and decrement operators | ✓ | i++ | |
hasForLoops | ✓ | for i := 0; i < end; i++: | |
hasIfs | ✓ | if condition: | |
Static Methods | ✓ | static foo x y | |
Constants | ✓ | X ::= 0 | |
Constructors | ✓ | constructor x: | |
Inheritance | ✓ | class Foo extends Bar: | |
Classes | ✓ | // Creating a custom class. class Point: x /int := 42 y /int := 103 | |
Semantic Indentation | ✓ | ||
Integers | ✓ | x := 0 |