summaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@digitalgrammars.com>2019-06-12 15:28:25 +0200
committerJohn J. Camilleri <john@digitalgrammars.com>2019-06-12 15:28:25 +0200
commit46a1bdc7ea469d3b9b1f4c57e6d3c636480d385c (patch)
tree82c7e185742d759b6a329f5a65f53a455aa95b14 /src/runtime
parent18d0e1fad0c1a29082c1b90c7d7dbb11c6440275 (diff)
gflib.ts: also accept U+00C0-U+00FF (\192-\255) in idents in parseTree
Matches definition in src/compiler/GF/Grammar/Lexer.x
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/typescript/gflib.ts2
-rw-r--r--src/runtime/typescript/js/gflib.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/typescript/gflib.ts b/src/runtime/typescript/gflib.ts
index 4d5a45cfd..8b7bb0fc5 100644
--- a/src/runtime/typescript/gflib.ts
+++ b/src/runtime/typescript/gflib.ts
@@ -215,7 +215,7 @@ class GFAbstract {
}
public parseTree(str: string, type: string): Fun | null {
- let pt = this.parseTree_(str.match(/[\w\'\.\"]+|\(|\)|\?|\:/g) || [], 0)
+ let pt = this.parseTree_(str.match(/[\w\u00C0-\u00FF\'\.\"]+|\(|\)|\?|\:/g) || [], 0)
return pt ? this.annotate(pt, type) : null
}
diff --git a/src/runtime/typescript/js/gflib.js b/src/runtime/typescript/js/gflib.js
index 1df0b34d4..6fdadcf0e 100644
--- a/src/runtime/typescript/js/gflib.js
+++ b/src/runtime/typescript/js/gflib.js
@@ -172,7 +172,7 @@ var GFAbstract = (function () {
return t;
};
GFAbstract.prototype.parseTree = function (str, type) {
- var pt = this.parseTree_(str.match(/[\w\'\.\"]+|\(|\)|\?|\:/g) || [], 0);
+ var pt = this.parseTree_(str.match(/[\w\u00C0-\u00FF\'\.\"]+|\(|\)|\?|\:/g) || [], 0);
return pt ? this.annotate(pt, type) : null;
};
GFAbstract.prototype.parseTree_ = function (tokens, prec) {