@@ -33,7 +33,7 @@ class SymbolCALL(Symbol):
3333 def __init__ (self , entry : SymbolID , arglist : Iterable [SymbolARGUMENT ], lineno : int , filename : str ):
3434 assert isinstance (entry , SymbolID )
3535 assert all (isinstance (x , SymbolARGUMENT ) for x in arglist )
36- assert entry .class_ in ( CLASS .array , CLASS .function , CLASS .sub , CLASS .unknown )
36+ assert entry .class_ in { CLASS .array , CLASS .function , CLASS .sub , CLASS .unknown }
3737
3838 super ().__init__ ()
3939 self .entry = entry
@@ -55,7 +55,7 @@ def __init__(self, entry: SymbolID, arglist: Iterable[SymbolARGUMENT], lineno: i
5555 arg .value .ref .is_dynamically_accessed = True
5656
5757 @property
58- def entry (self ):
58+ def entry (self ) -> SymbolID :
5959 return self .children [0 ]
6060
6161 @entry .setter
@@ -67,13 +67,13 @@ def entry(self, value: SymbolID):
6767 self .children [0 ] = value
6868
6969 @property
70- def args (self ):
70+ def args (self ) -> SymbolARGLIST :
7171 return self .children [1 ]
7272
7373 @args .setter
74- def args (self , value ):
74+ def args (self , value : SymbolARGLIST ):
7575 assert isinstance (value , SymbolARGLIST )
76- if self . children is None or not self .children :
76+ if not self .children :
7777 self .children = [None ]
7878
7979 if len (self .children ) < 2 :
@@ -104,6 +104,7 @@ def make_node(cls, id_: str, params, lineno: int, filename: str) -> Self | None:
104104 else : # All functions go to global scope by default
105105 if entry .token != "FUNCTION" :
106106 entry = entry .to_function (lineno )
107+
107108 gl .SYMBOL_TABLE .move_to_global_scope (id_ )
108109 result = cls (entry , params , lineno , filename )
109110 gl .FUNCTION_CALLS .append (result )
0 commit comments