@danielx/civet 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +8 -24
- package/dist/main.js +8 -24
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -717,7 +717,6 @@ var Civet = (() => {
|
|
|
717
717
|
Init,
|
|
718
718
|
Indent,
|
|
719
719
|
TrackIndent,
|
|
720
|
-
RestoreIndent,
|
|
721
720
|
Samedent,
|
|
722
721
|
IndentedFurther,
|
|
723
722
|
PushIndent,
|
|
@@ -941,7 +940,7 @@ var Civet = (() => {
|
|
|
941
940
|
return Arguments$0(state) || Arguments$1(state);
|
|
942
941
|
}
|
|
943
942
|
}
|
|
944
|
-
var ArgumentsWithTrailingCallExpressions$0 = $TS($S(TrackIndent, $C($S(Arguments, $Q($S($Y(EOS), Samedent, $N($EXPECT($L0, fail, 'ArgumentsWithTrailingCallExpressions "`"')), CallExpressionRest)),
|
|
943
|
+
var ArgumentsWithTrailingCallExpressions$0 = $TS($S(TrackIndent, $C($S(Arguments, $Q($S($Y(EOS), Samedent, $N($EXPECT($L0, fail, 'ArgumentsWithTrailingCallExpressions "`"')), CallExpressionRest)), PopIndent), PopIndent)), function($skip, $loc, $0, $1, $2) {
|
|
945
944
|
if (!$2)
|
|
946
945
|
return $skip;
|
|
947
946
|
return $2;
|
|
@@ -4466,8 +4465,6 @@ var Civet = (() => {
|
|
|
4466
4465
|
}
|
|
4467
4466
|
var Init$0 = $TS($S($E(Shebang), DirectivePrologue, $EXPECT($L1, fail, 'Init ""')), function($skip, $loc, $0, $1, $2, $3) {
|
|
4468
4467
|
var directives = $2;
|
|
4469
|
-
module.lastIndent = 0;
|
|
4470
|
-
module.trackedIndents = [0];
|
|
4471
4468
|
module.currentIndent = 0;
|
|
4472
4469
|
module.indentLevels = [0];
|
|
4473
4470
|
module.verbose = false;
|
|
@@ -4502,7 +4499,6 @@ var Civet = (() => {
|
|
|
4502
4499
|
}
|
|
4503
4500
|
var Indent$0 = $TV($Q($C($EXPECT($L139, fail, 'Indent " "'), $EXPECT($L140, fail, 'Indent "\\\\t"'))), function($skip, $loc, $0, $1) {
|
|
4504
4501
|
const level = $1.length;
|
|
4505
|
-
module.lastIndent = level;
|
|
4506
4502
|
return {
|
|
4507
4503
|
$loc,
|
|
4508
4504
|
token: "".padStart(level * 2),
|
|
@@ -4519,7 +4515,7 @@ var Civet = (() => {
|
|
|
4519
4515
|
}
|
|
4520
4516
|
}
|
|
4521
4517
|
var TrackIndent$0 = $TV($EXPECT($L1, fail, 'TrackIndent ""'), function($skip, $loc, $0, $1) {
|
|
4522
|
-
module.
|
|
4518
|
+
module.indentLevels.push(module.currentIndent);
|
|
4523
4519
|
});
|
|
4524
4520
|
function TrackIndent(state) {
|
|
4525
4521
|
if (state.verbose)
|
|
@@ -4530,22 +4526,11 @@ var Civet = (() => {
|
|
|
4530
4526
|
return TrackIndent$0(state);
|
|
4531
4527
|
}
|
|
4532
4528
|
}
|
|
4533
|
-
var RestoreIndent$0 = $TV($EXPECT($L1, fail, 'RestoreIndent ""'), function($skip, $loc, $0, $1) {
|
|
4534
|
-
const topLevel = module.trackedIndents.pop();
|
|
4535
|
-
module.lastIndent = topLevel;
|
|
4536
|
-
});
|
|
4537
|
-
function RestoreIndent(state) {
|
|
4538
|
-
if (state.verbose)
|
|
4539
|
-
console.log("ENTER:", "RestoreIndent");
|
|
4540
|
-
if (state.tokenize) {
|
|
4541
|
-
return $TOKEN("RestoreIndent", state, RestoreIndent$0(state));
|
|
4542
|
-
} else {
|
|
4543
|
-
return RestoreIndent$0(state);
|
|
4544
|
-
}
|
|
4545
|
-
}
|
|
4546
4529
|
var Samedent$0 = $TS($S($E(EOS), Indent), function($skip, $loc, $0, $1, $2) {
|
|
4547
4530
|
var indent = $2;
|
|
4548
|
-
|
|
4531
|
+
const { level } = indent;
|
|
4532
|
+
const currentIndent = module.indentLevels[module.indentLevels.length - 1];
|
|
4533
|
+
if (level === currentIndent) {
|
|
4549
4534
|
return $0;
|
|
4550
4535
|
}
|
|
4551
4536
|
return $skip;
|
|
@@ -4561,7 +4546,9 @@ var Civet = (() => {
|
|
|
4561
4546
|
}
|
|
4562
4547
|
var IndentedFurther$0 = $TS($S($E(EOS), Indent), function($skip, $loc, $0, $1, $2) {
|
|
4563
4548
|
var indent = $2;
|
|
4564
|
-
|
|
4549
|
+
const { level } = indent;
|
|
4550
|
+
const currentIndent = module.indentLevels[module.indentLevels.length - 1];
|
|
4551
|
+
if (level > currentIndent) {
|
|
4565
4552
|
return $0;
|
|
4566
4553
|
}
|
|
4567
4554
|
return $skip;
|
|
@@ -4581,7 +4568,6 @@ var Civet = (() => {
|
|
|
4581
4568
|
console.log("pushing indent", module.currentIndent);
|
|
4582
4569
|
}
|
|
4583
4570
|
module.indentLevels.push(module.currentIndent);
|
|
4584
|
-
return module.currentIndent;
|
|
4585
4571
|
});
|
|
4586
4572
|
function PushIndent(state) {
|
|
4587
4573
|
if (state.verbose)
|
|
@@ -4598,7 +4584,6 @@ var Civet = (() => {
|
|
|
4598
4584
|
}
|
|
4599
4585
|
module.indentLevels.pop();
|
|
4600
4586
|
module.currentIndent = module.indentLevels[module.indentLevels.length - 1];
|
|
4601
|
-
return module.currentIndent;
|
|
4602
4587
|
});
|
|
4603
4588
|
function PopIndent(state) {
|
|
4604
4589
|
if (state.verbose)
|
|
@@ -4869,7 +4854,6 @@ var Civet = (() => {
|
|
|
4869
4854
|
console.warn("No source map found in code");
|
|
4870
4855
|
return codeWithSourceMap;
|
|
4871
4856
|
}
|
|
4872
|
-
debugger;
|
|
4873
4857
|
composedLines = SourceMap.composeLines(upstreamMap.data.lines, parsed.lines);
|
|
4874
4858
|
upstreamMap.data.lines = composedLines;
|
|
4875
4859
|
remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath);
|
package/dist/main.js
CHANGED
|
@@ -716,7 +716,6 @@ var require_parser = __commonJS({
|
|
|
716
716
|
Init,
|
|
717
717
|
Indent,
|
|
718
718
|
TrackIndent,
|
|
719
|
-
RestoreIndent,
|
|
720
719
|
Samedent,
|
|
721
720
|
IndentedFurther,
|
|
722
721
|
PushIndent,
|
|
@@ -940,7 +939,7 @@ var require_parser = __commonJS({
|
|
|
940
939
|
return Arguments$0(state) || Arguments$1(state);
|
|
941
940
|
}
|
|
942
941
|
}
|
|
943
|
-
var ArgumentsWithTrailingCallExpressions$0 = $TS($S(TrackIndent, $C($S(Arguments, $Q($S($Y(EOS), Samedent, $N($EXPECT($L0, fail, 'ArgumentsWithTrailingCallExpressions "`"')), CallExpressionRest)),
|
|
942
|
+
var ArgumentsWithTrailingCallExpressions$0 = $TS($S(TrackIndent, $C($S(Arguments, $Q($S($Y(EOS), Samedent, $N($EXPECT($L0, fail, 'ArgumentsWithTrailingCallExpressions "`"')), CallExpressionRest)), PopIndent), PopIndent)), function($skip, $loc, $0, $1, $2) {
|
|
944
943
|
if (!$2)
|
|
945
944
|
return $skip;
|
|
946
945
|
return $2;
|
|
@@ -4465,8 +4464,6 @@ var require_parser = __commonJS({
|
|
|
4465
4464
|
}
|
|
4466
4465
|
var Init$0 = $TS($S($E(Shebang), DirectivePrologue, $EXPECT($L1, fail, 'Init ""')), function($skip, $loc, $0, $1, $2, $3) {
|
|
4467
4466
|
var directives = $2;
|
|
4468
|
-
module2.lastIndent = 0;
|
|
4469
|
-
module2.trackedIndents = [0];
|
|
4470
4467
|
module2.currentIndent = 0;
|
|
4471
4468
|
module2.indentLevels = [0];
|
|
4472
4469
|
module2.verbose = false;
|
|
@@ -4501,7 +4498,6 @@ var require_parser = __commonJS({
|
|
|
4501
4498
|
}
|
|
4502
4499
|
var Indent$0 = $TV($Q($C($EXPECT($L139, fail, 'Indent " "'), $EXPECT($L140, fail, 'Indent "\\\\t"'))), function($skip, $loc, $0, $1) {
|
|
4503
4500
|
const level = $1.length;
|
|
4504
|
-
module2.lastIndent = level;
|
|
4505
4501
|
return {
|
|
4506
4502
|
$loc,
|
|
4507
4503
|
token: "".padStart(level * 2),
|
|
@@ -4518,7 +4514,7 @@ var require_parser = __commonJS({
|
|
|
4518
4514
|
}
|
|
4519
4515
|
}
|
|
4520
4516
|
var TrackIndent$0 = $TV($EXPECT($L1, fail, 'TrackIndent ""'), function($skip, $loc, $0, $1) {
|
|
4521
|
-
module2.
|
|
4517
|
+
module2.indentLevels.push(module2.currentIndent);
|
|
4522
4518
|
});
|
|
4523
4519
|
function TrackIndent(state) {
|
|
4524
4520
|
if (state.verbose)
|
|
@@ -4529,22 +4525,11 @@ var require_parser = __commonJS({
|
|
|
4529
4525
|
return TrackIndent$0(state);
|
|
4530
4526
|
}
|
|
4531
4527
|
}
|
|
4532
|
-
var RestoreIndent$0 = $TV($EXPECT($L1, fail, 'RestoreIndent ""'), function($skip, $loc, $0, $1) {
|
|
4533
|
-
const topLevel = module2.trackedIndents.pop();
|
|
4534
|
-
module2.lastIndent = topLevel;
|
|
4535
|
-
});
|
|
4536
|
-
function RestoreIndent(state) {
|
|
4537
|
-
if (state.verbose)
|
|
4538
|
-
console.log("ENTER:", "RestoreIndent");
|
|
4539
|
-
if (state.tokenize) {
|
|
4540
|
-
return $TOKEN("RestoreIndent", state, RestoreIndent$0(state));
|
|
4541
|
-
} else {
|
|
4542
|
-
return RestoreIndent$0(state);
|
|
4543
|
-
}
|
|
4544
|
-
}
|
|
4545
4528
|
var Samedent$0 = $TS($S($E(EOS), Indent), function($skip, $loc, $0, $1, $2) {
|
|
4546
4529
|
var indent = $2;
|
|
4547
|
-
|
|
4530
|
+
const { level } = indent;
|
|
4531
|
+
const currentIndent = module2.indentLevels[module2.indentLevels.length - 1];
|
|
4532
|
+
if (level === currentIndent) {
|
|
4548
4533
|
return $0;
|
|
4549
4534
|
}
|
|
4550
4535
|
return $skip;
|
|
@@ -4560,7 +4545,9 @@ var require_parser = __commonJS({
|
|
|
4560
4545
|
}
|
|
4561
4546
|
var IndentedFurther$0 = $TS($S($E(EOS), Indent), function($skip, $loc, $0, $1, $2) {
|
|
4562
4547
|
var indent = $2;
|
|
4563
|
-
|
|
4548
|
+
const { level } = indent;
|
|
4549
|
+
const currentIndent = module2.indentLevels[module2.indentLevels.length - 1];
|
|
4550
|
+
if (level > currentIndent) {
|
|
4564
4551
|
return $0;
|
|
4565
4552
|
}
|
|
4566
4553
|
return $skip;
|
|
@@ -4580,7 +4567,6 @@ var require_parser = __commonJS({
|
|
|
4580
4567
|
console.log("pushing indent", module2.currentIndent);
|
|
4581
4568
|
}
|
|
4582
4569
|
module2.indentLevels.push(module2.currentIndent);
|
|
4583
|
-
return module2.currentIndent;
|
|
4584
4570
|
});
|
|
4585
4571
|
function PushIndent(state) {
|
|
4586
4572
|
if (state.verbose)
|
|
@@ -4597,7 +4583,6 @@ var require_parser = __commonJS({
|
|
|
4597
4583
|
}
|
|
4598
4584
|
module2.indentLevels.pop();
|
|
4599
4585
|
module2.currentIndent = module2.indentLevels[module2.indentLevels.length - 1];
|
|
4600
|
-
return module2.currentIndent;
|
|
4601
4586
|
});
|
|
4602
4587
|
function PopIndent(state) {
|
|
4603
4588
|
if (state.verbose)
|
|
@@ -4868,7 +4853,6 @@ var require_util = __commonJS({
|
|
|
4868
4853
|
console.warn("No source map found in code");
|
|
4869
4854
|
return codeWithSourceMap;
|
|
4870
4855
|
}
|
|
4871
|
-
debugger;
|
|
4872
4856
|
composedLines = SourceMap2.composeLines(upstreamMap.data.lines, parsed.lines);
|
|
4873
4857
|
upstreamMap.data.lines = composedLines;
|
|
4874
4858
|
remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath);
|