pub fn from_node(map: &map::Map<'a>, id: NodeId) -> Option<Code<'a>> {
        match map.get(id) {
            map::NodeBlock(_) => {
                //  Use the parent, hopefully an expression node.
                Code::from_node(map, map.get_parent_node(id))
            }
            map::NodeExpr(expr) => Some(Code::Expr(expr)),
            node => FnLikeNode::from_node(node).map(Code::FnLike)
        }
    }
/// Attempts to construct a Code from presumed FnLike or Expr node input.
Attempts to construct a Code from presumed FnLike or Expr node input.
Attempts to construct a Code from presumed FnLike or Expr node input .
pub fn from_node(map: &map::Map<'a>, id: NodeId) -> Option<Code<'a>> {
        match map.get(id) {
            map::NodeBlock(_) => {
                //  Use the parent, hopefully an expression node.
                Code::from_node(map, map.get_parent_node(id))
            }
            map::NodeExpr(expr) => Some(Code::Expr(expr)),
            node => FnLikeNode::from_node(node).map(Code::FnLike)
        }
    }
pub fn from_node ( map : & map :: Map < ' a > , id : NodeId ) -> Option < Code < ' a > > { match map . get ( id ) { map :: NodeBlock ( _ ) => { //  Use the parent, hopefully an expression node. Code :: from_node ( map , map . get_parent_node ( id ) ) } map :: NodeExpr ( expr ) => Some ( Code :: Expr ( expr ) ) , node => FnLikeNode :: from_node ( node ) . map ( Code :: FnLike ) } }
Attempts to construct a Code from presumed FnLike or Expr node input.
Attempts to construct a Code from presumed FnLike or Expr node input .
map
&map::Map<'a>
id
NodeId