Several source and netlist objects inherit `LineInfo` while separately storing the lexical position associated with the same source location. This requires callers to copy the file, line, and lexical position independently. Add the lexical position to `LineInfo`. Have `set_line()` initialize it when it is unset, so new objects inherit the complete source location while later diagnostic location updates preserve their established declaration order. Initialize the field to `UINT_MAX` so zero remains available as a valid scanner position and missing initialization is distinguishable. Have `FILE_NAME()` preserve a more precise identifier position. Remove constructor parameters that duplicate the position supplied through `FILE_NAME()`. Use the shared field for identifiers, wires, events, event triggers, nets, and elaborated events. Assign static class property nets their declaration location since they previously relied on the standalone `NetNet` position defaulting to zero. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> |
||
|---|---|---|
| .. | ||
| LineInfo.cc | ||
| LineInfo.h | ||
| StringHeap.cc | ||
| StringHeap.h | ||