- Updated SymbolType mappings

----

Test cases

- Updated test case to test the above (`simple_variables.t`)
This commit is contained in:
Tristan B. Velloza Kildaire 2022-12-13 11:41:25 +02:00
parent 5364380e7c
commit 8978a74a21
2 changed files with 13 additions and 1 deletions

View File

@ -470,6 +470,18 @@ public string getCharacter(SymbolType symbolIn)
{
return "+";
}
else if(symbolIn == SymbolType.STAR)
{
return "*";
}
else if(symbolIn == SymbolType.SUB)
{
return "-";
}
else if(symbolIn == SymbolType.DIVIDE)
{
return "/";
}
else
{
gprintln("getCharacter: No back-mapping for "~to!(string)(symbolIn), DebugType.ERROR);

View File

@ -1,7 +1,7 @@
module simple_variables_decls_ass;
int x = 1+2+2+1;
int x = 1+2*2/1-6;
int y = 2;
discard "TODO: Technically the below should not be allowed as we cannot do it in C - sadly";