File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212from src .api import config , errmsg , global_
1313from src .api .constants import CLASS , SCOPE
1414from src .symbols import sym as symbols
15+ from src .symbols .symbol_ import Symbol
1516from src .symbols .type_ import Type
1617
1718__all__ = [
@@ -318,7 +319,7 @@ def is_number(*p):
318319 """Returns True if ALL the arguments are AST nodes
319320 containing NUMBER or numeric CONSTANTS
320321 """
321- return all (i .token in ("NUMBER" , "CONST" ) and Type .is_numeric (i .type_ ) for i in p )
322+ return all (isinstance ( i , Symbol ) and i .token in ("NUMBER" , "CONST" ) and Type .is_numeric (i .type_ ) for i in p )
322323
323324
324325def is_static_str (* p ):
Original file line number Diff line number Diff line change 1+ DIM A AS UBYTE
2+ DO LOOP WHILE A = " "
Original file line number Diff line number Diff line change @@ -159,3 +159,8 @@ ND.Controls.bas:4: error: Invalid argument 'dirData'
159159ND.Controls.bas:2: warning: [W150] Variable 'dirData' is never used
160160>>> process_file('arch/zx48k/bad_fname_err4.bas', ['-S', '-q'])
161161ND.Controls.bas:2: error: sub 'Controls_LABEL' declared but not implemented
162+
163+ # DO LOOP type errors
164+ >>> process_file('arch/zx48k/do_crash.bas', ['-S', '-q'])
165+ do_crash.bas:2: error: Cannot convert string to a value. Use VAL() function
166+ do_crash.bas:2: warning: [W130] Empty loop
You can’t perform that action at this time.
0 commit comments