Added some future data structure stubs for type checking

develop_before_lexer_parser_merge_parseName
Tristan B. V. Kildaire 2021-03-21 13:00:56 +02:00
parent fb818c3c86
commit f1b7a39751
1 changed files with 32 additions and 0 deletions

View File

@ -295,6 +295,38 @@ public bool isMathOp(Token token)
tokenStr[0] == '*' || tokenStr[0] == '/';
}
/**
* TODO: Implement the blow and use them
*
* These are just to use for keeping track of what
* valid identifiers are.
*
* The are NOT used for code gen
*/
public class Program
{
private Variable[] globals;
private Function[] functions;
}
public class Function
{
/* The residing program */
private Program program;
private Variable[] locals;
}
public class Variable
{
private string type;
private string identifier;
}
/* Test: Character literal */
unittest
{