n3 2.7.10 → 2.7.11
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/browser/n3.esm.min.js +4 -4
- package/browser/n3.min.js +4 -4
- package/lib/N3Lexer.js +3 -3
- package/package.json +1 -1
- package/src/N3Lexer.js +6 -6
package/lib/N3Lexer.js
CHANGED
|
@@ -337,11 +337,11 @@ class N3Lexer {
|
|
|
337
337
|
case 'f':
|
|
338
338
|
case 't':
|
|
339
339
|
// Try to match a boolean
|
|
340
|
-
if (
|
|
340
|
+
if (this._boolean.test(input)) type = 'literal', value = firstChar === 't' ? 'true' : 'false', prefix = xsd.boolean, matchLength = value.length;else inconclusive = true;
|
|
341
341
|
break;
|
|
342
342
|
case 'a':
|
|
343
343
|
// Try to find an abbreviated predicate
|
|
344
|
-
if (
|
|
344
|
+
if (this._shortPredicates.test(input)) type = 'abbreviation', value = 'a', matchLength = 1;else inconclusive = true;
|
|
345
345
|
break;
|
|
346
346
|
case 'h':
|
|
347
347
|
case 'o':
|
|
@@ -350,7 +350,7 @@ class N3Lexer {
|
|
|
350
350
|
break;
|
|
351
351
|
case 'i':
|
|
352
352
|
// Try to find an IRI property list identifier or N3 verb keyword
|
|
353
|
-
if (this._n3Mode &&
|
|
353
|
+
if (this._n3Mode && this._n3Id.test(input)) type = 'id', matchLength = 2;else if (this._n3Mode && (match = this._matchN3Verb(input, inputFinished))) type = match[0];else inconclusive = true;
|
|
354
354
|
break;
|
|
355
355
|
case '=':
|
|
356
356
|
// Try to find an implication arrow or equals sign
|
package/package.json
CHANGED
package/src/N3Lexer.js
CHANGED
|
@@ -336,16 +336,16 @@ export default class N3Lexer {
|
|
|
336
336
|
case 'f':
|
|
337
337
|
case 't':
|
|
338
338
|
// Try to match a boolean
|
|
339
|
-
if (
|
|
340
|
-
type = 'literal', value =
|
|
339
|
+
if (this._boolean.test(input))
|
|
340
|
+
type = 'literal', value = firstChar === 't' ? 'true' : 'false', prefix = xsd.boolean, matchLength = value.length;
|
|
341
341
|
else
|
|
342
342
|
inconclusive = true;
|
|
343
343
|
break;
|
|
344
344
|
|
|
345
345
|
case 'a':
|
|
346
346
|
// Try to find an abbreviated predicate
|
|
347
|
-
if (
|
|
348
|
-
type = 'abbreviation', value = 'a';
|
|
347
|
+
if (this._shortPredicates.test(input))
|
|
348
|
+
type = 'abbreviation', value = 'a', matchLength = 1;
|
|
349
349
|
else
|
|
350
350
|
inconclusive = true;
|
|
351
351
|
break;
|
|
@@ -361,8 +361,8 @@ export default class N3Lexer {
|
|
|
361
361
|
|
|
362
362
|
case 'i':
|
|
363
363
|
// Try to find an IRI property list identifier or N3 verb keyword
|
|
364
|
-
if (this._n3Mode &&
|
|
365
|
-
type = 'id';
|
|
364
|
+
if (this._n3Mode && this._n3Id.test(input))
|
|
365
|
+
type = 'id', matchLength = 2;
|
|
366
366
|
else if (this._n3Mode && (match = this._matchN3Verb(input, inputFinished)))
|
|
367
367
|
type = match[0];
|
|
368
368
|
else
|