Fix parsing of the ** operator

This commit is contained in:
Kevin Brown 2020-05-14 20:04:02 -04:00
parent 06bcc5f9ac
commit e5d018fdef
2 changed files with 2 additions and 1 deletions

View File

@ -254,7 +254,7 @@ conditional_expression
complex_expression_powers
=
left:variable_identifier {SP}* operator:"**" {SP}* right:variable_identifier
left:variable_identifier {SP}* math_operator:"**" {SP}* right:variable_identifier
;
complex_expression_math2

View File

@ -500,6 +500,7 @@ def parse_conditional_expression_math(ast):
'+': nodes.Add,
'-': nodes.Sub,
'*': nodes.Mul,
'**': nodes.Pow,
'/': nodes.Div,
'//': nodes.FloorDiv,
'%': nodes.Mod,