1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Move EOF/isEOF from core/parser.js to core/primitives.js

Given the nature of `EOF` and `isEOF`, it seems to me that they really ought to be placed in `core/primitives.js` instead.

In general, it doesn't seem great to have to depend on the entire `core/parser.js` file for such simple primitives/helper functions.
In particular, while `core/ps_parser.js` is completely separate from `core/parser.js` with regards to its function, it still depends on the latter for just *one* primitive.

Note that compared to e.g. PR 7389, this will not reduce the number of dependencies for `core/ps_parser`, however the new dependency IMHO makes more sense.
This commit is contained in:
Jonas Jenwald 2017-01-27 13:34:37 +01:00
parent e132fa976e
commit 50c2856097
5 changed files with 17 additions and 15 deletions

View file

@ -18,18 +18,18 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('pdfjs/core/ps_parser', ['exports', 'pdfjs/shared/util',
'pdfjs/core/parser'], factory);
'pdfjs/core/primitives'], factory);
} else if (typeof exports !== 'undefined') {
factory(exports, require('../shared/util.js'), require('./parser.js'));
factory(exports, require('../shared/util.js'), require('./primitives.js'));
} else {
factory((root.pdfjsCorePsParser = {}), root.pdfjsSharedUtil,
root.pdfjsCoreParser);
root.pdfjsCorePrimitives);
}
}(this, function (exports, sharedUtil, coreParser) {
}(this, function (exports, sharedUtil, corePrimitives) {
var error = sharedUtil.error;
var isSpace = sharedUtil.isSpace;
var EOF = coreParser.EOF;
var EOF = corePrimitives.EOF;
var PostScriptParser = (function PostScriptParserClosure() {
function PostScriptParser(lexer) {