@@ -78,7 +78,7 @@ def check_is_declared_explicit(lineno, id_, classname='variable'):
7878
7979
8080def check_type_is_explicit (lineno : int , id_ : str , type_ ):
81- from symbols .type_ import SymbolTYPE
81+ from src . symbols .type_ import SymbolTYPE
8282 assert isinstance (type_ , SymbolTYPE )
8383 if type_ .implicit :
8484 if config .OPTIONS .strict :
@@ -114,7 +114,7 @@ def check_call_arguments(lineno, id_, args):
114114 return False
115115
116116 if param .byref :
117- from symbols .var import SymbolVAR
117+ from src . symbols .var import SymbolVAR
118118 if not isinstance (arg .value , SymbolVAR ):
119119 error (lineno , "Expected a variable name, not an expression (parameter By Reference)" )
120120 return False
@@ -210,7 +210,7 @@ def is_null(*symbols):
210210 """ True if no nodes or all the given nodes are either
211211 None, NOP or empty blocks. For blocks this applies recursively
212212 """
213- from symbols .symbol_ import Symbol
213+ from src . symbols .symbol_ import Symbol
214214
215215 for sym in symbols :
216216 if sym is None :
@@ -231,7 +231,7 @@ def is_SYMBOL(token, *symbols):
231231 """ Returns True if ALL of the given argument are AST nodes
232232 of the given token (e.g. 'BINARY')
233233 """
234- from symbols .symbol_ import Symbol
234+ from src . symbols .symbol_ import Symbol
235235 assert all (isinstance (x , Symbol ) for x in symbols )
236236 for sym in symbols :
237237 if sym .token != token :
@@ -295,7 +295,7 @@ def is_var(*p):
295295
296296
297297def is_integer (* p ):
298- from symbols .type_ import Type
298+ from src . symbols .type_ import Type
299299
300300 try :
301301 for i in p :
@@ -312,7 +312,7 @@ def is_integer(*p):
312312def is_unsigned (* p ):
313313 """ Returns false unless all types in p are unsigned
314314 """
315- from symbols .type_ import Type
315+ from src . symbols .type_ import Type
316316
317317 try :
318318 for i in p :
@@ -329,7 +329,7 @@ def is_unsigned(*p):
329329def is_signed (* p ):
330330 """ Returns false unless all types in p are signed
331331 """
332- from symbols .type_ import Type
332+ from src . symbols .type_ import Type
333333
334334 try :
335335 for i in p :
@@ -346,7 +346,7 @@ def is_signed(*p):
346346def is_numeric (* p ):
347347 """ Returns false unless all elements in p are of numerical type
348348 """
349- from symbols .type_ import Type
349+ from src . symbols .type_ import Type
350350
351351 try :
352352 for i in p :
@@ -379,7 +379,7 @@ def is_dynamic(*p): # TODO: Explain this better
379379 """ True if all args are dynamic (e.g. Strings, dynamic arrays, etc)
380380 The use a ptr (ref) and it might change during runtime.
381381 """
382- from symbols .type_ import Type
382+ from src . symbols .type_ import Type
383383
384384 try :
385385 for i in p :
@@ -397,7 +397,7 @@ def is_dynamic(*p): # TODO: Explain this better
397397def is_callable (* p ):
398398 """ True if all the args are functions and / or subroutines
399399 """
400- import symbols
400+ from .. import symbols
401401 return all (isinstance (x , symbols .FUNCTION ) for x in p )
402402
403403
@@ -427,9 +427,9 @@ def common_type(a, b):
427427 """ Returns a type which is common for both a and b types.
428428 Returns None if no common types allowed.
429429 """
430- from symbols .type_ import SymbolBASICTYPE as BASICTYPE
431- from symbols .type_ import Type as TYPE
432- from symbols .type_ import SymbolTYPE
430+ from src . symbols .type_ import SymbolBASICTYPE as BASICTYPE
431+ from src . symbols .type_ import Type as TYPE
432+ from src . symbols .type_ import SymbolTYPE
433433
434434 if a is None or b is None :
435435 return None
0 commit comments