|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
449 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 | const parser = require("./generated-parser.js");
|
|---|
| 3 |
|
|---|
| 4 | exports.name = function (potentialName) {
|
|---|
| 5 | return mapResult(parser.startWith("Name").exec(potentialName));
|
|---|
| 6 | };
|
|---|
| 7 |
|
|---|
| 8 | exports.qname = function (potentialQname) {
|
|---|
| 9 | return mapResult(parser.startWith("QName").exec(potentialQname));
|
|---|
| 10 | };
|
|---|
| 11 |
|
|---|
| 12 | function mapResult(result) {
|
|---|
| 13 | return {
|
|---|
| 14 | success: result.success,
|
|---|
| 15 | error: result.error && parser.getTrace(result.error.message)
|
|---|
| 16 | };
|
|---|
| 17 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.