summaryrefslogtreecommitdiff
path: root/usr/austin/eval/compiler.go
diff options
context:
space:
mode:
Diffstat (limited to 'usr/austin/eval/compiler.go')
-rw-r--r--usr/austin/eval/compiler.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/austin/eval/compiler.go b/usr/austin/eval/compiler.go
index 676bff31e..f4ababf74 100644
--- a/usr/austin/eval/compiler.go
+++ b/usr/austin/eval/compiler.go
@@ -37,6 +37,17 @@ func (a *compiler) numError() int {
return a.numErrors + a.silentErrors;
}
+// The universal scope
+func newUniverse() *Scope {
+ sc := &Scope{nil, 0};
+ sc.block = &block{
+ scope: sc,
+ defs: make(map[string] Def)
+ };
+ return sc;
+}
+var universe *Scope = newUniverse();
+
// TODO(austin) These can all go in stmt.go now
type label struct {