Making src/core/ps_parser.js adhere to the style guide

This commit is contained in:
Tim van der Meij 2014-03-08 20:45:25 +01:00
parent 01b23439a9
commit 2adcaf4f64

View File

@ -38,8 +38,9 @@ var PostScriptParser = (function PostScriptParserClosure() {
return false;
},
expect: function PostScriptParser_expect(type) {
if (this.accept(type))
if (this.accept(type)) {
return true;
}
error('Unexpected symbol: found ' + this.token.type + ' expected ' +
type + '.');
},
@ -116,9 +117,9 @@ var PostScriptToken = (function PostScriptTokenClosure() {
PostScriptToken.getOperator = function PostScriptToken_getOperator(op) {
var opValue = opCache[op];
if (opValue)
if (opValue) {
return opValue;
}
return opCache[op] = new PostScriptToken(PostScriptTokenTypes.OPERATOR, op);
};
@ -203,8 +204,9 @@ var PostScriptLexer = (function PostScriptLexerClosure() {
}
}
var value = parseFloat(str);
if (isNaN(value))
if (isNaN(value)) {
error('Invalid floating point number: ' + value);
}
return value;
}
};