From 516fda54b3b055efb36e2c5a86195f2b3d67a0b2 Mon Sep 17 00:00:00 2001 From: Aidan Date: Thu, 28 Nov 2019 01:04:51 -0800 Subject: [PATCH] started work on variable table --- pkg/shsh/.token.go.swp | Bin 12288 -> 12288 bytes pkg/shsh/var_table.go | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pkg/shsh/var_table.go diff --git a/pkg/shsh/.token.go.swp b/pkg/shsh/.token.go.swp index 59be5bb9454153612c129848827cf103d0156762..2ffa4f6ad0b41d3908a222ca844f216178d1afb8 100644 GIT binary patch delta 30 kcmZojXh;xEG6?hZRj|-AWB>vI28IV6_hZj*6n(7^0D=MuZU6uP delta 30 kcmZojXh;xEG6?hZRj|-AWB>vI28P`o_hS!k6n(7^0Dx}^I{*Lx diff --git a/pkg/shsh/var_table.go b/pkg/shsh/var_table.go new file mode 100644 index 0000000..147ac1f --- /dev/null +++ b/pkg/shsh/var_table.go @@ -0,0 +1,17 @@ +package shsh + +import ( + "strings" +) + +type VarTable map[string]*Token + +var ( + GlobalVarTable *VarTable +) + +// Library represents variables defined in inner scope +// It is assumed library is ordered from innermost scope to outermost scope +func GetVar(arg string, library []VarTable) *Token { + +}