private Node parseMap() throws ParserError {
		if (!EAT(TokenType.LBRACE)) {
			return null;
		}

		List<Node> list = new ArrayList<>();

		while (pos < tokens.size()) {
			Node key = parseMapKey();
			if (key == null) {
				break;
			}

			if (!EAT(TokenType.ARROW)) {
				throw new ParserError("Missing => after map key", this);
			}

			Node value = parseExpr();
			if (value == null) {
				throw new ParserError("Missing expression after '=>'.", this);
			}

			list.add(key);
			list.add(value);

			if (!EAT(TokenType.COMMA)) {
				break;
			}
		}

		if (!EAT(TokenType.RBRACE)) {
			throw new ParserError("Missing '}' after map.", this);
		}

		return new Node(NodeType.MAP, list, PREV_LINE_NUMBER());
	}