언어 설정

Menu
Sites
Language
JsLint builder fails to parse some .js files

Hi,

whem building my application  JsLint fails reprots the following errors:

1-

_updatePreviousBookmark: function pdfHistory_updatePreviousBookmark() {

    if (this.updatePreviousBookmark &&

        this.currentBookmark && this.currentPage) {

      this.previousBookmark = this.currentBookmark;

      this.previousPage = this.currentPage;

      this.updatePreviousBookmark = false;

    }

  },
Multiple markers at this line
- Stopping.  (24% scanned).
- Expected 'isHashChangeUnlocked' and instead saw '{b}'.
- Expected 'set' and instead saw '_updatePreviousBookmark'.
 
 
2-
getByte: function ChunkedStream_getByte() {
var pos = this.pos;

      if (pos >= this.end) {

        return -1;

      }

      this.ensureRange(pos, pos + 1);

      return this.bytes[this.pos++];

    },
 
Multiple markers at this line
- Stopping. (0% scanned).
- Expected 'length' and instead saw '{b}'.
- Expected 'set' and instead saw 
'getByte'.
 
 
3-
    if (input.length % 4 == 1) throw new Error('bad atob input');

    for (

      // initialize result and counters

      // get next character

      buffer = input.charAt(idx++);

      // character found in table?

      // initialize bit storage and add its ascii value

      ~buffer && ((bs = (bc % 4)) ? (bs * 64 + buffer) : (buffer, (bc++ % 4))) ? (output += String.fromCharCode(255 & bs >> (-2 * bc & 6))) : 0

    ) {

      // try to find character in table (0-63, not found => -1)

      buffer = digits.indexOf(buffer);

    }

    return output;

  };

})();
 
Multiple markers at this line
- Expected a conditional expression and instead saw an 
assignment.
- Expected an identifier and instead saw '?'.
- Expected ')' to match '(' from line 292 and instead saw ','.
- Stopping. (61% scanned).
 
the code compiles fine on my linux machine,
 
any help please?
 
regards
Haithem

 

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

14 댓글
Lakshmi Grandhi
Hi , In our program there is issue with for loop for ( buffer = input.charAt(idx++); ~buffer && ((bs = (bc % 4)) ? (bs * 64 + buffer) : (buffer, (bc++ % 4))); ) kindly replace for loop code with above changes
haithem rahmani
Hi Lakshmi, thanks for your answer, but it doesn't solove my issue, is there anyway to: - update the JSDT plugin in the tizen SDK? - customize the build steps for a tizen web application regards Haithem
Lakshmi Grandhi
try re-installing the SDK instead of replacing the plugin. Are you facng sample issue for building sample app provided by tizen framework.
haithem rahmani
Hi Lakshmi, After reinstalling the SDK 2.2.0 I'm facing another problem now. when trying to create a tizen web project from an existing template the IDE exits completely. I'm running the SDK 2.2.0 on ubuntu 12.04 this doesn't happen with tizen 2.1. regards Haithem
haithem rahmani
I've reinstalled my ubuntu distribution and it's fine with the tizen now, but my jslint problem is still there. again is there any way to update the JSDT plugin or to have a 'manual' way to compile a tizen web project?
haithem rahmani
Hi, the following example "https://01.org/html5webapps/webapps/todo-list" is failing to compile too: web-ui-fw.js: Multiple markers at this line - Expected an identifier and instead saw ','. - Stopping. (37% scanned). ... can you try it? can you try it
talari praveen kumar
Hi The code you have mentioned has old libraries I have replaced those libraries and it is compiling without any errors, please download the widget from below link https://www.4shared.com/file/6DyKe_O4/ToDoList.html?
haithem rahmani
Hi Praveen, Thanks! it compiles now, but i can't understand what are the "old librairies" you have replaced? how can those libs make the JSlint fail to compile the js code? regards Haithem
talari praveen kumar
Hi Haithem I have replaced web-ui-fw-libs.js , date.js with latest versions and web-ui-fw.js with tizen-web-ui-fw.js. As tizen sdk has upgraded to 2.2 it doesnt supports some old functions so i have replaced.
Rajat Sharma
Hi All I installed Tizen sdk a day ago and ported my code to the same. It shows a lot of js errors. Is there a way to suppress JSLint errors. I tried preferences but does not seem to work.
Lakshmi Grandhi
Kindly check if there are any API changes, else created new project and copy your code.
Rajat Sharma
Hi Lakshmi. API changes as in ? Please note that to start with I have imported my FE code from my existing hybrid app projects. Mostly I see only syntactical errors like 'Expected an identifier and instead saw ',' and rest are 'Stopping 10%'. I am not using any Tizen specific API as of now. Thanks
Lakshmi Grandhi
can you place share your code to check errors.
Rajat Sharma
I have imported a www folder from my project. This is the complete folder having html + js + css content. I have modified config.xml to refer my main html file from inside www folder. I ignore the JS errors (there are too many of them and mainly JSLint ones) and make .wgt file. My app gets installed on emulator but does not run. I see a blank page. Is it because of my js errors ? My whole package structure is different from normal tizen web app structure. Basically, other IDE created folders are untouched and I rum my whole code from www. Can anyone please provide some help as to what I am doing wrong. The sample app Annex runs fine.