Making src/core/ps_parser.js adhere to the style guide
This commit is contained in:
parent
01b23439a9
commit
2adcaf4f64
@ -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;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user