Add type definitions for IDE service
This commit is contained in:
parent
8d302b1533
commit
c31817f44a
24
libs/ide_services/types.py
Normal file
24
libs/ide_services/types.py
Normal file
@ -0,0 +1,24 @@
|
||||
from typing import List
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Position(BaseModel):
|
||||
line: int # 0-based
|
||||
character: int # 0-based
|
||||
|
||||
|
||||
class Range(BaseModel):
|
||||
start: Position
|
||||
end: Position
|
||||
|
||||
|
||||
class Location(BaseModel):
|
||||
abspath: str
|
||||
range: Range
|
||||
|
||||
|
||||
class SymbolNode(BaseModel):
|
||||
name: str
|
||||
kind: str
|
||||
range: Range
|
||||
children: List["SymbolNode"]
|
Loading…
x
Reference in New Issue
Block a user