From 66021f4dae1813ab3dfed9ea52552188e7289ee6 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 9 Nov 2015 18:07:08 +0800 Subject: [PATCH] JSDOC/ScopeParser.vala --- JSDOC/ScopeParser.vala | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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; -- 2.39.2