(pos)
| 14 | * @returns {string} formatted position |
| 15 | */ |
| 16 | const formatPosition = (pos) => { |
| 17 | if (pos && typeof pos === "object") { |
| 18 | if ("line" in pos && "column" in pos) { |
| 19 | return `${pos.line}:${pos.column}`; |
| 20 | } else if ("line" in pos) { |
| 21 | return `${pos.line}:?`; |
| 22 | } |
| 23 | } |
| 24 | return ""; |
| 25 | }; |
| 26 | |
| 27 | /** |
| 28 | * Returns formatted location. |