src/Parser/Parser.php
protected function parseMap($lc, array $contents = null, $rc): MapNode
    {
        $entries = [];
        
        if ($contents !== null) {
            $entries[$contents[0][0]] = $contents[0][1];
            
            foreach ($contents[1] as list (, $entry)) {
                $entries[$entry[0]] = $entry[1];
            }
        }
        
        return new MapNode($entries);
    }
protected function parseMap($lc, array $contents = null, $rc): MapNode
    {
        $entries = [];
        
        if ($contents !== null) {
            $entries[$contents[0][0]] = $contents[0][1];
            
            foreach ($contents[1] as list (, $entry)) {
                $entries[$entry[0]] = $entry[1];
            }
        }
        
        return new MapNode($entries);
    }
Map ::= '{' ( MapEntry ( ',' MapEntry )* )? '}'