stache

git clone https://git.ce9e.org/stache.git

commit
a152365910da464c1fdedd97e7a0d326115e45f5
parent
a4617a3c44672095343d9b57d7afe09063212606
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-07-04 12:48
optional path in parse()

Diffstat

M stache.py 2 +-

1 files changed, 1 insertions, 1 deletions


diff --git a/stache.py b/stache.py

@@ -46,7 +46,7 @@ def tokenize(s: str, path: str) -> Iterable[Node]:
   46    46         yield Node('text', tail, path, line, i, [])
   47    47 
   48    48 
   49    -1 def parse(s: str, path: str) -> list[Node]:
   -1    49 def parse(s: str, path: str='') -> list[Node]:
   50    50     stack: list[list[Node]] = [[]]
   51    51     for node in tokenize(s, path):
   52    52         if node.type in ['#', '^']: