case "PUNC.LEFT_CURLY": // {
case "PUNC.LEFT_PAREN": // (
+ case "PUNC.LEFT_BRACE": // [
//print('SCOPE-CURLY/PAREN:' + token.toString());
//println("<i>"+token.data+"</i>");
var curTS = this.ts;
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"));
case '(': //Token.LP:
case '{': //Token.LC:
case '[': //Token.LB:
- print('SCOPE-CURLY/PAREN/BRACE:' + token.toString());
+ //print('SCOPE-CURLY/PAREN/BRACE:' + token.toString());
// print('SCOPE-CURLY/PAREN/BRACE:' + JSON.stringify(token, null,4));
//println("<i>"+token.data+"</i>");
var curTS = this.ts;
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) {