mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Use the new Range class in more places
This commit is contained in:
parent
56274d7c1f
commit
3bcc9f4cbd
10 changed files with 91 additions and 90 deletions
|
@ -113,9 +113,9 @@ class TestSamples(unittest.TestCase):
|
|||
raise MultipleErrors(warnings)
|
||||
except PrintableError as e:
|
||||
|
||||
def error_str(error):
|
||||
line, col = utils.idx_to_pos(error.start + 1, blueprint)
|
||||
len = error.end - error.start
|
||||
def error_str(error: CompileError):
|
||||
line, col = utils.idx_to_pos(error.range.start + 1, blueprint)
|
||||
len = error.range.length
|
||||
return ",".join([str(line + 1), str(col), str(len), error.message])
|
||||
|
||||
if isinstance(e, CompileError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue