Closed stevegeek closed 12 years ago
It has changed since you linted it, so I'll just lint it myself. Thanks for the suggestion, I do trust Douglas Crockford's JS better than my own.
Nevermind, I thought it auto-fixed the problems. I'll just fix the conflicts from yours (they aren't big).
Ok well if you decide not to use this in the end, then note that JSLint will warn about calling parseInt without a base parameter. Since I suppose values in the DCPU ASM can be in hex, octal or decimal I wrote a little function called parseLiteral() to appropriately call parseInt() depending on the input string.
Edit: It is basically untested. Time for qunit :)
Pulled, thanks.
Ah ok cool
Hey if you are interested here is a JSLint of the DCPU source. It significantly changes the code so if you are interested then I recommend you pull as soon as you can be bothered as otherwise you will have a merge nightmare on your hands.
JSLint is slightly annoying and draconian but it enforces some good practices, helps find numerous bugs, and helps ensure a common code style throughout the project.
There is also a fix to the end() method which was referencing and old property name.
Later I might do some optimisation and introduce the underscore library to simplify the code a bit, but depends on time of course!