This repository was archived by the owner on Apr 14, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ public static int GetBodyStartIndex(this IScope scope) {
2727 return cd . HeaderIndex ;
2828 case FunctionDefinition fd :
2929 return fd . HeaderIndex ;
30+ case null :
31+ return 0 ;
3032 default :
3133 return scope . Node . StartIndex ;
3234 }
Original file line number Diff line number Diff line change @@ -126,9 +126,9 @@ public EmptyGlobalScope(IPythonModule module) {
126126 }
127127 public IPythonModule Module { get ; }
128128 public string Name => string . Empty ;
129- public ScopeStatement Node => null ;
129+ public ScopeStatement Node => Module . Analysis . Ast ;
130130 public IScope OuterScope => null ;
131- public IGlobalScope GlobalScope { get ; protected set ; }
131+ public IGlobalScope GlobalScope { get ; }
132132 public IReadOnlyList < IScope > Children => Array . Empty < IScope > ( ) ;
133133 public IEnumerable < IScope > EnumerateTowardsGlobal => Enumerable . Repeat ( this , 1 ) ;
134134 public IEnumerable < IScope > EnumerateFromGlobal => Enumerable . Repeat ( this , 1 ) ;
You can’t perform that action at this time.
0 commit comments