Skip to content

Commit

Permalink
restore visit_num just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmojaki committed Nov 24, 2024
1 parent e672f6b commit f11ca39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions asttokens/mark_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ def handle_num(self,
first_token = self._code.prev_token(first_token)
return (first_token, last_token)

def visit_num(self, node, first_token, last_token):
# type: (AstNode, util.Token, util.Token) -> Tuple[util.Token, util.Token]
return self.handle_num(node, cast(ast.Num, node).n, first_token, last_token)

def visit_const(self, node, first_token, last_token):
# type: (AstNode, util.Token, util.Token) -> Tuple[util.Token, util.Token]
assert isinstance(node, ast.Constant) or isinstance(node, nc.Const)
Expand Down

0 comments on commit f11ca39

Please sign in to comment.