def p_operator_expr2(p):
    lineno = p.lineno(1)
    body = p[2]
    if not isinstance(body, _INVERTABLE):
        msg = "can't assign to expression of this form"
        syntax_error(msg, FakeToken(p.lexer.lexer, lineno))
    body.lineno = lineno
    ast.fix_missing_locations(body)
    expr = ast.Expression(body=body)
    python = enaml_ast.PythonExpression(ast=expr, lineno=lineno)
    p[0] = enaml_ast.OperatorExpr(operator=p[1], value=python, lineno=lineno)


# The disallowed ast types on the rhs of a :: operator
operator_expr : COLONEQUAL test NEWLINE
dataset/ETHPy150Open nucleic/enaml/enaml/core/parser.py/p_operator_expr2