mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-24 02:12:50 -06:00
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 {
|
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
|
return pt ? this.annotate(pt, type) : null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ var GFAbstract = (function () {
|
|||||||
return t;
|
return t;
|
||||||
};
|
};
|
||||||
GFAbstract.prototype.parseTree = function (str, type) {
|
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;
|
return pt ? this.annotate(pt, type) : null;
|
||||||
};
|
};
|
||||||
GFAbstract.prototype.parseTree_ = function (tokens, prec) {
|
GFAbstract.prototype.parseTree_ = function (tokens, prec) {
|
||||||
|
|||||||
Reference in New Issue
Block a user