Notes |
|
|
That happens because type declarations and pragmas are added to the HLDS during the same pass.
One solution would be to add all the type declarations before adding all the pragmas; the disadvantage of that approach is that it would require another traversal of the parse tree during parse tree -> hlds conversion. |
|
|
|
Actually, there's another solution to this, we could allow foreign_type pragmas to act as type declarations. |
|
|
(0000653)
|
zs
|
2014-03-03 14:13
|
|
I think the right solution is to away with the notion of "passes" over the item list altogether.
I think the one and only pass over the item list should construct a set of cords; one cord for type declarations, one for inst declarations, one for mode declarations, one for pred declarations and so on. Once those cords have been converted to lists, the rest of the code should then process those lists
in the order that their dependencies dictate. One of those dictates would be the need to process type declarations before processing foreign type pragmas.
The main complication is that at the moment, the import status of each item is effectively implicit in the position of the item with respect to status markers in the item list, and the exact details of that dependence are not well documented. Most of those details are obvious, but some are not. |
|
|
(0000857)
|
zs
|
2015-10-29 15:23
|
|
Fix committed 2015 oct 29. |
|