diff --git a/pkg/shsh/symbol_table.go b/pkg/shsh/symbol_table.go index 746a986..aed3886 100644 --- a/pkg/shsh/symbol_table.go +++ b/pkg/shsh/symbol_table.go @@ -4,7 +4,22 @@ import ( "strings" ) -// TODO: Enum{Operator, Variable} -// TODO build hashmap bucket -// TODO define type for function signature operation -// TODO functions for get_symbol, add_symbol +// TODO: Maybe I should just have two tables + +type operation func(*Token) *Token +type symbol_tag int +const ( + SYM_OPERATOR symbol_tag = iota, + SYM_VARIABLE symbol_tag = iota +) + +type bucket struct { + symbol string + tag symbol_tag + _inner interface{} +} + +func set_variable(key string, val string) {} +func get_variable(arg string) string {} +func set_operator(key string, val operation) {} +func get_operator(arg string) operation {}