protected Expression mapExpression(AST mapNode) {
        List expressions = new ArrayList();
        AST elist = mapNode.getFirstChild();
        if (elist != null) {  // totally empty in the case of [:]
            assertNodeType(ELIST, elist);
            for (AST node = elist.getFirstChild(); node != null; node = node.getNextSibling()) {
                switch (node.getType()) {
                    case LABELED_ARG:
                    case SPREAD_MAP_ARG:
                        break;  // legal cases
                    case SPREAD_ARG:
                        assertNodeType(SPREAD_MAP_ARG, node);
                        break;  // helpful error
                    default:
                        assertNodeType(LABELED_ARG, node);
                        break;  // helpful error
                }
                expressions.add(mapEntryExpression(node));
            }
        }
        MapExpression mapExpression = new MapExpression(expressions);
        configureAST(mapExpression, mapNode);
        return mapExpression;
    }
protected Expression mapExpression ( AST mapNode ) { List expressions = new ArrayList ( ) ; AST elist = mapNode . getFirstChild ( ) ; if ( elist != null ) { assertNodeType ( ELIST , elist ) ; for ( AST node = elist . getFirstChild ( ) ; node != null ; node = node . getNextSibling ( ) ) { switch ( node . getType ( ) ) { case LABELED_ARG : case SPREAD_MAP_ARG : break ; case SPREAD_ARG : assertNodeType ( SPREAD_MAP_ARG , node ) ; break ; default : assertNodeType ( LABELED_ARG , node ) ; break ; } expressions . add ( mapEntryExpression ( node ) ) ; } } MapExpression mapExpression = new MapExpression ( expressions ) ; configureAST ( mapExpression , mapNode ) ; return mapExpression ; }
Typically only used for map constructors I think?