mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Use "using" instead of "gtk" and "import"
- Having one keyword for both is less syntax to remember - I might use "include" as a keyword in the future, which would make "import" confusing, so use "using" instead
This commit is contained in:
parent
78a9481631
commit
b3c28ce3d4
5 changed files with 27 additions and 13 deletions
|
@ -68,6 +68,8 @@ def did_you_mean(word: str, options: [str]) -> T.Optional[str]:
|
|||
|
||||
|
||||
def idx_to_pos(idx: int, text: str) -> (int, int):
|
||||
if idx == 0:
|
||||
return (0, 0)
|
||||
sp = text[:idx].splitlines(keepends=True)
|
||||
line_num = len(sp)
|
||||
col_num = len(sp[-1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue