From f9bd00d49a9de977ecbf75b5fda6d0372483b2e2 Mon Sep 17 00:00:00 2001 From: NateN1222 Date: Sat, 28 Oct 2017 09:12:54 -0500 Subject: Minor changes for release on mozilla addon store --- main_background.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'main_background.js') diff --git a/main_background.js b/main_background.js index d26c5f8..c61c4f2 100644 --- a/main_background.js +++ b/main_background.js @@ -1569,7 +1569,7 @@ var fname_data = { "NodeList": true, "StopIteration": true }; -//************************Comes from HTML file index.html's script test.js**************************** +//************************this part can be tested in the HTML file index.html's script test.js**************************** function full_evaluate(script){ var res = true; @@ -1679,11 +1679,13 @@ function full_evaluate(script){ } } // Is there bracket suffix notation? - if(is_bsn(toke.end)){ - dbg_print("%c NONTRIVIAL: Bracket suffix notation on variable '"+toke.value+"'","color:red"); - if(DEBUG == false){ - return [false,"NONTRIVIAL: Bracket suffix notation on variable '"+toke.value+"'"]; - } + if(operators[toke.value] === undefined){ + if(is_bsn(toke.end)){ + dbg_print("%c NONTRIVIAL: Bracket suffix notation on variable '"+toke.value+"'","color:red"); + if(DEBUG == false){ + return [false,"NONTRIVIAL: Bracket suffix notation on variable '"+toke.value+"'"]; + } + } } }else{ dbg_print("trivial token:"+toke.value); @@ -1695,8 +1697,6 @@ function full_evaluate(script){ }catch(e){ dbg_print("Denied script because it cannot be parsed."); return [false,"NONTRIVIAL: Cannot be parsed."]; - console.warn("Continuing evaluation"); - error_count++; } } -- cgit v1.2.3