From: Alan Knowles Date: Mon, 9 Nov 2015 10:07:08 +0000 (+0800) Subject: JSDOC/ScopeParser.vala X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=66021f4dae1813ab3dfed9ea52552188e7289ee6 JSDOC/ScopeParser.vala --- diff --git a/JSDOC/ScopeParser.vala b/JSDOC/ScopeParser.vala index a59024a..37a2a1d 100644 --- a/JSDOC/ScopeParser.vala +++ b/JSDOC/ScopeParser.vala @@ -434,7 +434,7 @@ namespace JSDOC { // should do a bit more checking!!!! (what about wierd char's in the string.. var str = token.data.substring(1,token.data.length-1); - if (Regex.match_simple ("^[a-z_]+$", str) && this.idents.index_of(str) < 0) { + if (Regex.match_simple ("^[a-z_]+$", str,GLib.RegexCompileFlags.CASELESS) && this.idents.index_of(str) < 0) { token.outData = str; } @@ -773,8 +773,16 @@ namespace JSDOC { if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) { if (token.name == "EVAL") { + + Regex.match_simple ("s[ai]mple", "This is a simple sample.",GLib.RegexCompileFlags.CASELESS); + var regex = new GLib.Regex ("eval:var:([a-z_]+)",GLib.RegexCompileFlags.CASELESS ); + + regex.replace_eval (token.prefix, token.prefix.length, 0, 0, (match_info, result) => { + + //print(JSON.stringify(token,null,4)); - if (token.prefix && token.prefix.match(/eval:var:/g)) { + + if (token.prefix.length > 0 && token.prefix.match(/eval:var:/g)) { // look for eval:var:noreplace\n // print("GOT MATCH?"); var _t = this;