fn check_reassignable(ast: &AST) -> TypeResult<()> {
    match &ast.node {
        Node::PropertyCall { property, .. } => check_reassignable(property),
        _ =>
            if Identifier::try_from(ast).is_ok() {
                Ok(())
            } else {
                let msg = format!("Cannot reassign to {}", &ast.node);
                Err(vec![TypeErr::new(&ast.pos, &msg)])
            },
    }
}
/// Check if AST is reassignable: is reassignable if valid identifier.
Check if AST is reassignable: is reassignable if valid identifier.
Check if AST is reassignable : is reassignable if valid identifier .
fn check_reassignable(ast: &AST) -> TypeResult<()> {
    match &ast.node {
        Node::PropertyCall { property, .. } => check_reassignable(property),
        _ =>
            if Identifier::try_from(ast).is_ok() {
                Ok(())
            } else {
                let msg = format!("Cannot reassign to {}", &ast.node);
                Err(vec![TypeErr::new(&ast.pos, &msg)])
            },
    }
}
fn check_reassignable ( ast : & AST ) -> TypeResult < ( ) > { match & ast . node { Node :: PropertyCall { property , .. } => check_reassignable ( property ) , _ => if Identifier :: try_from ( ast ) . is_ok ( ) { Ok ( ( ) ) } else { let msg = format ! ( " " ast node ) ; Err ( vec ! [ TypeErr new ( ast pos msg ) ] ) } , } }
Check if AST is reassignable: is reassignable if valid identifier.
Check if AST is reassignable : is reassignable if valid identifier .
ast
&AST