Skip to content

Commit

Permalink
chore: skip branch if no exponent parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymao committed Oct 31, 2023
1 parent 3d60f0e commit 808b0bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sqlglot/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3378,7 +3378,9 @@ def _parse_term(self) -> t.Optional[exp.Expression]:
return self._parse_tokens(self._parse_factor, self.TERM)

def _parse_factor(self) -> t.Optional[exp.Expression]:
return self._parse_tokens(self._parse_exponent, self.FACTOR)
if self.EXPONENT:
return self._parse_tokens(self._parse_exponent, self.FACTOR)
return self._parse_tokens(self._parse_unary, self.FACTOR)

def _parse_exponent(self) -> t.Optional[exp.Expression]:
return self._parse_tokens(self._parse_unary, self.EXPONENT)
Expand Down

0 comments on commit 808b0bb

Please sign in to comment.