@retorquere/bibtex-parser 6.4.6 → 6.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/grammar.js +23 -15
- package/index.js +1 -0
- package/package.json +16 -16
package/grammar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by Peggy
|
|
1
|
+
// Generated by Peggy 3.0.0.
|
|
2
2
|
//
|
|
3
3
|
// https://peggyjs.org/
|
|
4
4
|
|
|
@@ -45,16 +45,19 @@ peg$SyntaxError.prototype.format = function(sources) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
var s = this.location.start;
|
|
48
|
-
var
|
|
48
|
+
var offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
|
|
49
|
+
? this.location.source.offset(s)
|
|
50
|
+
: s;
|
|
51
|
+
var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
|
|
49
52
|
if (src) {
|
|
50
53
|
var e = this.location.end;
|
|
51
|
-
var filler = peg$padEnd("",
|
|
54
|
+
var filler = peg$padEnd("", offset_s.line.toString().length, ' ');
|
|
52
55
|
var line = src[s.line - 1];
|
|
53
56
|
var last = s.line === e.line ? e.column : line.length + 1;
|
|
54
57
|
var hatLen = (last - s.column) || 1;
|
|
55
58
|
str += "\n --> " + loc + "\n"
|
|
56
59
|
+ filler + " |\n"
|
|
57
|
-
+
|
|
60
|
+
+ offset_s.line + " | " + line + "\n"
|
|
58
61
|
+ filler + " | " + peg$padEnd("", s.column - 1, ' ')
|
|
59
62
|
+ peg$padEnd("", hatLen, "^");
|
|
60
63
|
} else {
|
|
@@ -503,14 +506,14 @@ function peg$parse(input, options) {
|
|
|
503
506
|
}
|
|
504
507
|
}
|
|
505
508
|
};
|
|
506
|
-
var peg$f35 = function(mark,
|
|
509
|
+
var peg$f35 = function(mark, chr) {
|
|
507
510
|
return {
|
|
508
511
|
kind: 'DiacriticCommand',
|
|
509
512
|
loc: location(),
|
|
510
513
|
source: text(),
|
|
511
514
|
mark: mark,
|
|
512
|
-
dotless: !!
|
|
513
|
-
character:
|
|
515
|
+
dotless: !!chr[1],
|
|
516
|
+
character: chr[1] || chr[0],
|
|
514
517
|
}
|
|
515
518
|
};
|
|
516
519
|
var peg$f36 = function(v) {
|
|
@@ -611,24 +614,24 @@ function peg$parse(input, options) {
|
|
|
611
614
|
value: v,
|
|
612
615
|
}
|
|
613
616
|
};
|
|
614
|
-
var peg$f46 = function(mark,
|
|
617
|
+
var peg$f46 = function(mark, chr) {
|
|
615
618
|
return {
|
|
616
619
|
kind: 'DiacriticCommand',
|
|
617
620
|
loc: location(),
|
|
618
621
|
source: text(),
|
|
619
622
|
mark: mark,
|
|
620
|
-
dotless: !!
|
|
621
|
-
character:
|
|
623
|
+
dotless: !!chr[1],
|
|
624
|
+
character: chr[1] || chr[0],
|
|
622
625
|
}
|
|
623
626
|
};
|
|
624
|
-
var peg$f47 = function(mark,
|
|
627
|
+
var peg$f47 = function(mark, chr) {
|
|
625
628
|
return {
|
|
626
629
|
kind: 'DiacriticCommand',
|
|
627
630
|
loc: location(),
|
|
628
631
|
source: text(),
|
|
629
632
|
mark: mark,
|
|
630
|
-
dotless: !!
|
|
631
|
-
character:
|
|
633
|
+
dotless: !!chr[1],
|
|
634
|
+
character: chr[1] || chr[0],
|
|
632
635
|
}
|
|
633
636
|
};
|
|
634
637
|
var peg$f48 = function(mark, v) {
|
|
@@ -909,11 +912,11 @@ function peg$parse(input, options) {
|
|
|
909
912
|
}
|
|
910
913
|
}
|
|
911
914
|
|
|
912
|
-
function peg$computeLocation(startPos, endPos) {
|
|
915
|
+
function peg$computeLocation(startPos, endPos, offset) {
|
|
913
916
|
var startPosDetails = peg$computePosDetails(startPos);
|
|
914
917
|
var endPosDetails = peg$computePosDetails(endPos);
|
|
915
918
|
|
|
916
|
-
|
|
919
|
+
var res = {
|
|
917
920
|
source: peg$source,
|
|
918
921
|
start: {
|
|
919
922
|
offset: startPos,
|
|
@@ -926,6 +929,11 @@ function peg$parse(input, options) {
|
|
|
926
929
|
column: endPosDetails.column
|
|
927
930
|
}
|
|
928
931
|
};
|
|
932
|
+
if (offset && peg$source && (typeof peg$source.offset === "function")) {
|
|
933
|
+
res.start = peg$source.offset(res.start);
|
|
934
|
+
res.end = peg$source.offset(res.end);
|
|
935
|
+
}
|
|
936
|
+
return res;
|
|
929
937
|
}
|
|
930
938
|
|
|
931
939
|
function peg$fail(expected) {
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retorquere/bibtex-parser",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.8",
|
|
4
4
|
"description": "BibTeX parser",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
@@ -36,31 +36,31 @@
|
|
|
36
36
|
"author": "Emiliano Heyns",
|
|
37
37
|
"license": "ISC",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@microsoft/api-documenter": "^7.
|
|
40
|
-
"@microsoft/api-extractor": "^7.
|
|
41
|
-
"@types/node": "^18.
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
43
|
-
"@typescript-eslint/parser": "^5.
|
|
39
|
+
"@microsoft/api-documenter": "^7.21.5",
|
|
40
|
+
"@microsoft/api-extractor": "^7.34.4",
|
|
41
|
+
"@types/node": "^18.14.1",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
|
43
|
+
"@typescript-eslint/parser": "^5.53.0",
|
|
44
44
|
"command-line-args": "^5.2.1",
|
|
45
|
-
"csv": "^6.2.
|
|
45
|
+
"csv": "^6.2.7",
|
|
46
46
|
"digital-tree": "^2.0.4",
|
|
47
47
|
"ejs": "^3.1.8",
|
|
48
|
-
"eslint": "^8.
|
|
49
|
-
"eslint-plugin-import": "^2.27.
|
|
48
|
+
"eslint": "^8.35.0",
|
|
49
|
+
"eslint-plugin-import": "^2.27.5",
|
|
50
50
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
51
|
-
"glob": "^8.0
|
|
52
|
-
"mkdirp": "^1.
|
|
51
|
+
"glob": "^8.1.0",
|
|
52
|
+
"mkdirp": "^2.1.3",
|
|
53
53
|
"node-fetch": "^3.3.0",
|
|
54
|
-
"peggy": "^
|
|
54
|
+
"peggy": "^3.0.0",
|
|
55
55
|
"piscina": "^3.2.0",
|
|
56
56
|
"slug": "^8.2.2",
|
|
57
|
-
"tap": "^16.3.
|
|
57
|
+
"tap": "^16.3.4",
|
|
58
58
|
"ts-node": "^10.9.1",
|
|
59
|
-
"tslib": "^2.
|
|
60
|
-
"typescript": "^4.9.
|
|
59
|
+
"tslib": "^2.5.0",
|
|
60
|
+
"typescript": "^4.9.5"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"unicode2latex": "^3.0.
|
|
63
|
+
"unicode2latex": "^3.0.1",
|
|
64
64
|
"xregexp": "^5.1.1"
|
|
65
65
|
},
|
|
66
66
|
"files": [
|