|
9 | 9 | # the GNU General License |
10 | 10 | # ---------------------------------------------------------------------- |
11 | 11 |
|
| 12 | +from typing import Dict |
| 13 | +from typing import Optional |
| 14 | +from typing import Set |
| 15 | + |
| 16 | +import src.api |
| 17 | + |
| 18 | +from .opcodestemps import OpcodesTemps |
| 19 | +from .constants import TYPE |
| 20 | + |
12 | 21 | # ---------------------------------------------------------------------- |
13 | 22 | # Simple global container for internal constants. |
14 | 23 | # Internal constants might be architecture dependant. They're set |
15 | 24 | # on module init (at __init__.py) on api.arch.<arch>/init.py |
16 | 25 | # |
17 | 26 | # Don't touch unless you know what are you doing |
18 | 27 | # ---------------------------------------------------------------------- |
19 | | -from typing import Dict |
20 | | - |
21 | | -from .opcodestemps import OpcodesTemps |
22 | | -from .constants import TYPE |
23 | 28 |
|
24 | 29 | # ---------------------------------------------------------------------- |
25 | 30 | # Initializes a singleton container |
|
73 | 78 | # ---------------------------------------------------------------------- |
74 | 79 | # Global Symbol Table |
75 | 80 | # ---------------------------------------------------------------------- |
76 | | -SYMBOL_TABLE = None # Must be initialized with SymbolTable() |
| 81 | +SYMBOL_TABLE: Optional['src.api.symboltable.SymbolTable'] = None # Must be initialized with SymbolTable() |
77 | 82 |
|
78 | 83 | # ---------------------------------------------------------------------- |
79 | 84 | # Function calls pending to check |
|
90 | 95 | # ---------------------------------------------------------------------- |
91 | 96 | # Initialization routines to be called automatically at program start |
92 | 97 | # ---------------------------------------------------------------------- |
93 | | -INITS = set([]) |
| 98 | +INITS: Set[str] = set([]) |
94 | 99 |
|
95 | 100 | # ---------------------------------------------------------------------- |
96 | 101 | # FUNCTIONS pending to translate after parsing stage |
|
156 | 161 | # ---------------------------------------------------------------------- |
157 | 162 | # Cache of Message errors to avoid repetition |
158 | 163 | # ---------------------------------------------------------------------- |
159 | | -error_msg_cache = set() |
| 164 | +error_msg_cache: Set[str] = set() |
160 | 165 |
|
161 | 166 |
|
162 | 167 | # ---------------------------------------------------------------------- |
|
0 commit comments