Sets the base `SourceLoc`, if not set yet, and returns the base value.
(&mut self, srcloc: SourceLoc)
| 101 | |
| 102 | /// Sets the base `SourceLoc`, if not set yet, and returns the base value. |
| 103 | pub fn ensure_base_srcloc(&mut self, srcloc: SourceLoc) -> SourceLoc { |
| 104 | match self.base_srcloc { |
| 105 | Some(val) => val, |
| 106 | None => { |
| 107 | self.base_srcloc = Some(srcloc); |
| 108 | srcloc |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | /// Retrieve a `UserExternalNameRef` for the given name, or add a new one. |
| 114 | /// |
no outgoing calls
no test coverage detected