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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user