JSDOC/ScopeParser.js
authorAlan Knowles <alan@akkbhome.com>
Thu, 15 Jul 2010 23:47:26 +0000 (07:47 +0800)
committerAlan Knowles <alan@akkbhome.com>
Thu, 15 Jul 2010 23:47:26 +0000 (07:47 +0800)
JSDOC/ScopeParser.js

index bc695ef..65d60f3 100644 (file)
@@ -521,10 +521,11 @@ ScopeParser.prototype = {
 
                         if (symbol == "eval") {
                             // look back one and see if we can find a comment!!!
-                            if (this.ts.look(-1).type == "COMM") {
+                            //if (this.ts.look(-1).type == "COMM") {
+                            if (token.prefix && token.prefix.match('/eval/')) {
                                 // look for eval:var:noreplace\n
                                 var _t = this;
-                                this.ts.look(-1).data.replace(/eval:var:([a-z_]+)/ig, function(m, a) {
+                                token.prefix.replace(/eval:var:([a-z_]+)/ig, function(m, a) {
                                     
                                     var hi = _t.getIdentifier(a, thisScope, token);
                                    // println("PROTECT "+a+" from munge" + (hi ? "FOUND" : "MISSING"));
@@ -767,10 +768,10 @@ ScopeParser.prototype = {
                     if (this.mode == 'BUILDING_SYMBOL_TREE') {
 
                         if (symbol == "eval") {
-                            if (this.ts.look(-1).type == 'COMM') {
+                            if (token.prefix && token.prefix.match('/eval/')) {
                                 // look for eval:var:noreplace\n
                                 var _t = this;
-                                this.ts.look(-1).data.replace(/eval:var:([a-z]+)/ig, function(m, a) {
+                                token.prefix.replace(/eval:var:([a-z]+)/ig, function(m, a) {
                                     var hi = _t.getIdentifier(a, currentScope, token);
                                    //println("PROTECT "+a+" from munge" + (hi ? "FOUND" : "MISSING"));
                                     if (hi) {