summaryrefslogtreecommitdiff
path: root/MLKLexicalContext.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-09-01 23:57:03 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-09-01 23:57:03 +0200
commitd2f326bbc766af34a2d1e5f0be4252eab41b2cac (patch)
tree1f5e3c6e1de94f8908c85ff4ebdb4710b66b76ac /MLKLexicalContext.m
parenta5364817b1cd751832a4634e4afbd67bb668fa2e (diff)
MLKLexicalContext: Add -variableIsGlobal:.
Diffstat (limited to 'MLKLexicalContext.m')
-rw-r--r--MLKLexicalContext.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/MLKLexicalContext.m b/MLKLexicalContext.m
index dd0dc9c..5f694ff 100644
--- a/MLKLexicalContext.m
+++ b/MLKLexicalContext.m
@@ -291,6 +291,11 @@ static MLKLexicalContext *global_context;
else return (_parent && [_parent variableIsLexical:symbol]);
}
+-(BOOL) variableIsGlobal:(id)name
+{
+ return [self contextForVariable:name] == [MLKLexicalContext globalContext];
+}
+
-(BOOL) functionIsInline:(MLKSymbol *)symbol
{
if ([_functions containsObject:symbol])