Skip to content

Commit

Permalink
Superficially type the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Nov 3, 2024
1 parent 210e3a1 commit 543e1b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymbolic/parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from pymbolic.typing import ExpressionT


__copyright__ = "Copyright (C) 2009-2013 Andreas Kloeckner"

Expand Down Expand Up @@ -559,7 +561,7 @@ def parse_arglist(self, pstate):

comma_allowed = True

def __call__(self, expr_str, min_precedence=0):
def __call__(self, expr_str: str, min_precedence: int = 0) -> ExpressionT:
lex_result = [(tag, s, idx, match_obj)
for (tag, s, idx, match_obj) in pytools.lex.lex(
self.lex_table, expr_str,
Expand Down

0 comments on commit 543e1b1

Please sign in to comment.