Merge pull request #4413 from timvandermeij/ps-parser-syntax

Making src/core/ps_parser.js adhere to the style guide
This commit is contained in:
Jonas Jenwald 2014-03-09 11:39:28 +01:00
commit fe99743844

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;
}
};