HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/node_modules/@prettier/plugin-xml/dist/parser.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const parser_1 = require("@xml-tools/parser");
const parser = {
    parse(text) {
        const { lexErrors, parseErrors, cst } = (0, parser_1.parse)(text);
        // If there are any lexical errors, throw the first of them as an error.
        if (lexErrors.length > 0) {
            const lexError = lexErrors[0];
            const error = new Error(lexError.message);
            error.loc = {
                start: { line: lexError.line, column: lexError.column },
                end: { line: lexError.line, column: lexError.column + lexError.length }
            };
            throw error;
        }
        // If there are any parse errors, throw the first of them as an error.
        if (parseErrors.length > 0) {
            const parseError = parseErrors[0];
            const error = new Error(parseError.message);
            const { token } = parseError;
            error.loc = {
                start: { line: token.startLine, column: token.startColumn },
                end: { line: token.endLine, column: token.endColumn }
            };
            throw error;
        }
        // Otherwise return the CST.
        return cst;
    },
    astFormat: "xml",
    locStart(node) {
        return node.location.startOffset;
    },
    locEnd(node) {
        return node.location.endOffset;
    }
};
exports.default = parser;