mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Name all constructors.
This commit is contained in:
parent
f239d01bde
commit
1ef4c94de2
12 changed files with 223 additions and 213 deletions
|
@ -9,8 +9,8 @@ function isEOF(v) {
|
|||
return v == EOF;
|
||||
}
|
||||
|
||||
var Parser = (function parserParser() {
|
||||
function constructor(lexer, allowStreams, xref) {
|
||||
var Parser = (function ParserClosure() {
|
||||
function Parser(lexer, allowStreams, xref) {
|
||||
this.lexer = lexer;
|
||||
this.allowStreams = allowStreams;
|
||||
this.xref = xref;
|
||||
|
@ -18,7 +18,7 @@ var Parser = (function parserParser() {
|
|||
this.refill();
|
||||
}
|
||||
|
||||
constructor.prototype = {
|
||||
Parser.prototype = {
|
||||
refill: function parserRefill() {
|
||||
this.buf1 = this.lexer.getObj();
|
||||
this.buf2 = this.lexer.getObj();
|
||||
|
@ -254,15 +254,15 @@ var Parser = (function parserParser() {
|
|||
}
|
||||
};
|
||||
|
||||
return constructor;
|
||||
return Parser;
|
||||
})();
|
||||
|
||||
var Lexer = (function lexer() {
|
||||
function constructor(stream) {
|
||||
var Lexer = (function LexerClosure() {
|
||||
function Lexer(stream) {
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
constructor.isSpace = function lexerIsSpace(ch) {
|
||||
Lexer.isSpace = function lexerIsSpace(ch) {
|
||||
return ch == ' ' || ch == '\t' || ch == '\x0d' || ch == '\x0a';
|
||||
};
|
||||
|
||||
|
@ -296,7 +296,7 @@ var Lexer = (function lexer() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
constructor.prototype = {
|
||||
Lexer.prototype = {
|
||||
getNumber: function lexerGetNumber(ch) {
|
||||
var floating = false;
|
||||
var str = ch;
|
||||
|
@ -558,11 +558,11 @@ var Lexer = (function lexer() {
|
|||
}
|
||||
};
|
||||
|
||||
return constructor;
|
||||
return Lexer;
|
||||
})();
|
||||
|
||||
var Linearization = (function linearizationLinearization() {
|
||||
function constructor(stream) {
|
||||
var Linearization = (function LinearizationClosure() {
|
||||
function Linearization(stream) {
|
||||
this.parser = new Parser(new Lexer(stream), false);
|
||||
var obj1 = this.parser.getObj();
|
||||
var obj2 = this.parser.getObj();
|
||||
|
@ -576,7 +576,7 @@ var Linearization = (function linearizationLinearization() {
|
|||
}
|
||||
}
|
||||
|
||||
constructor.prototype = {
|
||||
Linearization.prototype = {
|
||||
getInt: function linearizationGetInt(name) {
|
||||
var linDict = this.linDict;
|
||||
var obj;
|
||||
|
@ -635,6 +635,6 @@ var Linearization = (function linearizationLinearization() {
|
|||
}
|
||||
};
|
||||
|
||||
return constructor;
|
||||
return Linearization;
|
||||
})();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue