INNER CODE UNIT · Python
Directive
kejilion/sh · site_access_nginx.py:26
class Directive:
words: list[str]
start: int
end: int
@dataclass
class Block:
words: list[str]
start: int
open_end: int
end: int = -1
directives: list[Directive] = field(default_factory=list)
children: list["Block"] = field(default_factory=list)
def tokenize(text: str):
"""Yield decoded Nginx tokens together with their original source spans."""