fn parse_op_definable(&mut self, punct: &Punct) -> Result<IdentId, ParseErr> {
        // TODO: must support
        // ^
        // **   ~   +@  -@   ` !  !~
        match punct {
            Punct::Plus => Ok(IdentId::_ADD),
            Punct::Minus => Ok(IdentId::_SUB),
            Punct::Mul => Ok(IdentId::_MUL),
            Punct::Div => Ok(IdentId::_DIV),
            Punct::Rem => Ok(IdentId::_REM),
            Punct::Shl => Ok(IdentId::_SHL),
            Punct::Shr => Ok(IdentId::_SHR),
            Punct::BitAnd => Ok(IdentId::get_id("&")),
            Punct::BitOr => Ok(IdentId::get_id("|")),

            Punct::Cmp => Ok(IdentId::_CMP),
            Punct::Eq => Ok(IdentId::_EQ),
            Punct::Ne => Ok(IdentId::_NEQ),
            Punct::Lt => Ok(IdentId::_LT),
            Punct::Le => Ok(IdentId::_LE),
            Punct::Gt => Ok(IdentId::_GT),
            Punct::Ge => Ok(IdentId::_GE),
            Punct::TEq => Ok(IdentId::_TEQ),
            Punct::Match => Ok(IdentId::get_id("=~")),
            Punct::LBracket => {
                if self.consume_punct_no_term(Punct::RBracket)? {
                    if self.consume_punct_no_term(Punct::Assign)? {
                        Ok(IdentId::_INDEX_ASSIGN)
                    } else {
                        Ok(IdentId::_INDEX)
                    }
                } else {
                    let loc = self.loc();
                    Err(error_unexpected(loc, "Invalid operator."))
                }
            }
            _ => Err(error_unexpected(self.prev_loc(), "Invalid operator.")),
        }
    }
Parse operator which can be defined as a method.
Return IdentId of the operator.
ruruby-parse/src/parser.rs