mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
The OG compiler looks up function ids for most tokens, even when it doesn't need to. When this happens, it assigns the module id as the module of the function. When the token is later found not to be a function call, the parser changes the id to TOK_IDENT and the type to TYP_OPERAND, but leaves the module id. We can see this in the included script, which adds members, which have names that match module function names, to a struct. This doesn't cause problems during execution because the executor ignores the type for the emitted instructions. It does cause problems when comparing .ecl output for parity between the old compiler and the new compiler, because the new compiler does not look up every identifier to see if it's a function. This change assigns module = Mod_Basic along with id and type for tokens that are identifiers. |
||
|---|---|---|
| .. | ||
| parity001-identifier-module.out | ||
| parity001-identifier-module.src | ||