Skip to content

Commit

Permalink
It works ;_;
Browse files Browse the repository at this point in the history
  • Loading branch information
twolfson committed Sep 30, 2012
1 parent 7d5f486 commit 8d1b582
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/jsmin.c.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ nextIndex = getIndex;
switch (d) {
case 1:
assert.strictEqual(getChar(theAIndex, stdin), theA);
putc(theA, stdout);
puti(theAIndex, stdout);
if (theA === theB && (theA === '+' || theA === '-') && theY !== theA) {
putc(' ', stdout);
}
Expand All @@ -189,15 +189,15 @@ theAIndex = theBIndex;
if (theA === '\'' || theA === '"' || theA === '`') {
for (;;) {
assert.strictEqual(getChar(theAIndex, stdin), theA);
putc(theA, stdout);
puti(theAIndex, stdout);
theA = get();
theAIndex = getIndex;
if (theA === theB) {
break;
}
if (theA === '\\') {
assert.strictEqual(getChar(theAIndex, stdin), theA);
putc(theA, stdout);
puti(theAIndex, stdout);
theA = get();
theAIndex = getIndex;
}
Expand All @@ -216,23 +216,23 @@ theBIndex = nextIndex;
theA === '\n')) {
assert.strictEqual(getChar(theAIndex, stdin), theA);
assert.strictEqual(getChar(theBIndex, stdin), theB);
putc(theA, stdout);
putc(theB, stdout);
puti(theAIndex, stdout);
puti(theBIndex, stdout);
for (;;) {
theA = get();
theAIndex = getIndex;
if (theA === '[') {
for (;;) {
assert.strictEqual(getChar(theAIndex, stdin), theA);
putc(theA, stdout);
puti(theAIndex, stdout);
theA = get();
theAIndex = getIndex;
if (theA === ']') {
break;
}
if (theA === '\\') {
assert.strictEqual(getChar(theAIndex, stdin), theA);
putc(theA, stdout);
puti(theAIndex, stdout);
theA = get();
theAIndex = getIndex;
}
Expand All @@ -244,15 +244,15 @@ theAIndex = getIndex;
break;
} else if (theA ==='\\') {
assert.strictEqual(getChar(theAIndex, stdin), theA);
putc(theA, stdout);
puti(theAIndex, stdout);
theA = get();
theAIndex = getIndex;
}
if (theA === EOF) {
error("Unterminated Regular Expression literal.");
}
assert.strictEqual(getChar(theAIndex, stdin), theA);
putc(theA, stdout);
puti(theAIndex, stdout);
}
theB = next();
theBIndex = nextIndex;
Expand Down

0 comments on commit 8d1b582

Please sign in to comment.