forked from olcxjas-softworks/LarpixClient
Add capacitorjs runtime
This commit is contained in:
parent
d0ece489ee
commit
f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions
39
node_modules/@prettier/plugin-xml/dist/parser.js
generated
vendored
Normal file
39
node_modules/@prettier/plugin-xml/dist/parser.js
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
"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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue