use constants for True and False instead of tokens

This commit is contained in:
Aidan 2020-06-30 20:36:45 -07:00
parent a216d9af41
commit 53adeacc6d
No known key found for this signature in database
GPG key ID: 327711E983899316
5 changed files with 25 additions and 19 deletions

View file

@ -26,6 +26,9 @@ const (
NUMBER Token_t = iota
SYMBOL Token_t = iota
BOOL Token_t = iota
TRUE string = "T"
FALSE string = "F"
)
type Token struct {

View file

@ -105,7 +105,7 @@ func InitVarTable(table VarTable) {
}
if variable[0] == "HOME" {
SetVar('~', t, table)
SetVar("~", t, table)
}
SetVar(variable[0], t, table)
}