The Gizmo Programming Language!
Gizmo is a fast and user friendly language for manipulating or parsing strings. It may not be much to look at yet, but the key word there is yet.
Gizmo is in active development by the developers. For now, I'll tell you about what Gizmo can do currently.
Input and Output!
write functions, you can get either input or output. (You can probably guess which one does which).
Here's an example!
You can put an argument of any type into the write function.
Now that we've started talking about types
and all that nonsense, we can talk about variables.
Creating a variable in Gizmo takes this format.
<type> <name> = <value>
Some of the different value types in Gizmo are:
1. int (An integer)
2. char (A single character)
3. real (A decimal number)
4. bool (A conditional value, either true or false)
5. string (A "string" of characters)
Strings are surrounded by double quotes:
"This is a string"
Chars are surrounded by single quotes:
Functions in Gizmo take this format:
You can call them like this:
If statements check if a condition is true.
If it is, it executes the first block of code.
Optionally, you can tell gizmo to do something if the condition is not true using the else keyword.
Using the "else if" keyword, you can check multiple conditions.
Curly braces around the blocks inside are only needed if the block is more than one statement long.
I usually include the curly braces just for consistency.
Hope you enjoyed this post!
The github repo link - here
To run the code, enter:
a.ll for the outputted llvm ir code.