Basic formatting
Voodoo will be a tabbed block language. This means that tabs and newlines are important in the parsing of the language.
main group
sub child 1
sub child 2
secondary group
sub child 3
sub child 4
Seen here, sections of code are grouped relative to their indentation. There is no need to use semicolons and curly braces. For example in C++ an if statement would look like this.
if (i > 35 && j < 9)
{
m = i + j;
n = j - 2 * i;
}
else
{
m = i;
n = j;
}
The same code in voodoo would look like the following.
if (i > 35 && j < 9)
m = i + j
n = j - 2 * i
else
m = i
n = j
Because most people use tabs in their code there isn’t much lost using this syntax. Also the code looks cleaner.
To have a statement continued on the next line it must be double indented as to not count as a nested child of the statement. This restriction simplifies the parser and allows extra development time to focus on other things. This may be re-visited at a later date.