summaryrefslogtreecommitdiff
path: root/MLKLexicalContext.m
diff options
context:
space:
mode:
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])