Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Nested Set and Call Blocks #340

Merged
merged 8 commits into from
Dec 12, 2022
Prev Previous commit
Next Next commit
refactor: remove unused analyzer.stops
  • Loading branch information
tconbeer committed Dec 11, 2022
commit a6bcfa112bf1fe31474cde07bf1e3382e1267429
4 changes: 0 additions & 4 deletions src/sqlfmt/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class Analyzer:
comment_buffer: List[Comment] = field(default_factory=list)
line_buffer: List[Line] = field(default_factory=list)
rule_stack: List[List[Rule]] = field(default_factory=list)
stops: List[int] = field(default_factory=list)
pos: int = 0

@property
Expand Down Expand Up @@ -125,9 +124,6 @@ def lex_one(self, source_string: str) -> None:

Mutates the analyzer's buffers and pos
"""
if self.stops and self.pos >= self.stops[-1]:
raise StopIteration

for rule in self.rules:
match = rule.program.match(source_string, self.pos)
if match:
Expand Down