From d2f326bbc766af34a2d1e5f0be4252eab41b2cac Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 1 Sep 2008 23:57:03 +0200 Subject: MLKLexicalContext: Add -variableIsGlobal:. --- MLKLexicalContext.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MLKLexicalContext.m') 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]) -- cgit v1.2.3