1
0
forked from GitHub/gf-core

gflib.ts: also accept U+00C0-U+00FF (\192-\255) in idents in parseTree

Matches definition in src/compiler/GF/Grammar/Lexer.x
This commit is contained in:
John J. Camilleri
2019-06-12 15:28:25 +02:00
parent 18d0e1fad0
commit 46a1bdc7ea
2 changed files with 2 additions and 2 deletions

View File

@@ -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
}

View File

@@ -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) {