Commit 46e46700e98210a42cf9f8850ffadea55df2ba4c

Authored by Austin Sun
1 parent 5d9d0bcccc
Exists in master

added global check

Showing 2 changed files with 5 additions and 1 deletions Side-by-side Diff

... ... @@ -94,4 +94,8 @@
94 94 void addToScope(string s, Decl* d, llvm::Value * v) {
95 95 symbols[symbols.size()-1][s] = make_pair(d, v);
96 96 }
  97 +
  98 +bool global(){
  99 + return symbols.front()==symbols.back();
  100 +}
... ... @@ -122,7 +122,7 @@
122 122 void popScope();
123 123 void addToScope(string s, Decl* d, llvm::Value * v);
124 124 extern SymbolTable symbols;
125   -
  125 +bool global();
126 126  
127 127 #endif
128 128