From 46a1bdc7ea469d3b9b1f4c57e6d3c636480d385c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 12 Jun 2019 15:28:25 +0200 Subject: gflib.ts: also accept U+00C0-U+00FF (\192-\255) in idents in parseTree Matches definition in src/compiler/GF/Grammar/Lexer.x --- src/runtime/typescript/gflib.ts | 2 +- src/runtime/typescript/js/gflib.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime') 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) { -- cgit v1.2.3