Source
source
COMMENTS = '(?:\\/\\/[^\\n\\r]+?(?:\\*\\)|[\\n\\r]))'
module-attribute
WHITESPACES = re.compile('(?:\\s|' + COMMENTS + ')*')
module-attribute
Location
dataclass
Source code in xdsl/frontend/listlang/source.py
11 12 13 | |
pos: int
instance-attribute
__init__(pos: int) -> None
Located
dataclass
Bases: Generic[_LocatedCovT]
Source code in xdsl/frontend/listlang/source.py
19 20 21 22 23 24 25 | |
loc: Location
instance-attribute
value: _LocatedCovT
instance-attribute
__init__(loc: Location, value: _LocatedCovT) -> None
__bool__() -> bool
Source code in xdsl/frontend/listlang/source.py
24 25 | |
CodeCursor
Source code in xdsl/frontend/listlang/source.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
code: str = code
instance-attribute
pos: int = 0
instance-attribute
__init__(code: str)
Source code in xdsl/frontend/listlang/source.py
32 33 34 | |
skip_whitespaces()
Source code in xdsl/frontend/listlang/source.py
41 42 | |
next_regex(regex: re.Pattern[str]) -> Located[re.Match[str] | None]
Source code in xdsl/frontend/listlang/source.py
44 45 46 47 48 | |
peek_regex(regex: re.Pattern[str]) -> Located[re.Match[str] | None]
Source code in xdsl/frontend/listlang/source.py
50 51 52 | |
ParseError
dataclass
Bases: Exception
Source code in xdsl/frontend/listlang/source.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
position: int
instance-attribute
msg: str
instance-attribute
__init__(position: int, msg: str) -> None
from_loc(loc: Location, msg: str) -> ParseError
staticmethod
Source code in xdsl/frontend/listlang/source.py
60 61 62 | |
line_column(code: str) -> tuple[int, int]
Source code in xdsl/frontend/listlang/source.py
64 65 66 67 68 69 70 71 72 | |