@danielx/civet 0.3.8 → 0.3.10
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 +6 -8
- package/dist/browser.js.map +2 -2
- package/dist/civet +6 -6
- package/dist/cli.js.map +3 -3
- package/dist/main.js +6 -8
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -2099,7 +2099,7 @@ var Civet = (() => {
|
|
|
2099
2099
|
var BinaryOpSymbol$12 = $EXPECT($L68, fail, 'BinaryOpSymbol ">"');
|
|
2100
2100
|
var BinaryOpSymbol$13 = $EXPECT($L69, fail, 'BinaryOpSymbol "!=="');
|
|
2101
2101
|
var BinaryOpSymbol$14 = $TV($EXPECT($L70, fail, 'BinaryOpSymbol "!="'), function($skip, $loc, $0, $1) {
|
|
2102
|
-
if (
|
|
2102
|
+
if (module.coffeeCompat)
|
|
2103
2103
|
return "!==";
|
|
2104
2104
|
return $1;
|
|
2105
2105
|
});
|
|
@@ -2108,7 +2108,7 @@ var Civet = (() => {
|
|
|
2108
2108
|
});
|
|
2109
2109
|
var BinaryOpSymbol$16 = $EXPECT($L72, fail, 'BinaryOpSymbol "==="');
|
|
2110
2110
|
var BinaryOpSymbol$17 = $TV($EXPECT($L73, fail, 'BinaryOpSymbol "=="'), function($skip, $loc, $0, $1) {
|
|
2111
|
-
if (
|
|
2111
|
+
if (module.coffeeCompat)
|
|
2112
2112
|
return "===";
|
|
2113
2113
|
return $1;
|
|
2114
2114
|
});
|
|
@@ -3110,7 +3110,7 @@ var Civet = (() => {
|
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
3112
|
var CoffeeSingleLineComment$0 = $TR($EXPECT($R21, fail, "CoffeeSingleLineComment /#([^\\r\\n]*)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
|
|
3113
|
-
if (!
|
|
3113
|
+
if (!module.coffeeCompat)
|
|
3114
3114
|
return $skip;
|
|
3115
3115
|
return ["//", $1];
|
|
3116
3116
|
});
|
|
@@ -3748,7 +3748,7 @@ var Civet = (() => {
|
|
|
3748
3748
|
return TypeParameterDelimiter$0(state) || TypeParameterDelimiter$1(state) || TypeParameterDelimiter$2(state) || TypeParameterDelimiter$3(state);
|
|
3749
3749
|
}
|
|
3750
3750
|
}
|
|
3751
|
-
var Shebang$0 = $R$0($EXPECT($R32, fail, "Shebang /#![^\\r\\n]*/"));
|
|
3751
|
+
var Shebang$0 = $S($R$0($EXPECT($R32, fail, "Shebang /#![^\\r\\n]*/")), EOL);
|
|
3752
3752
|
function Shebang(state) {
|
|
3753
3753
|
if (state.verbose)
|
|
3754
3754
|
console.log("ENTER:", "Shebang");
|
|
@@ -3758,9 +3758,7 @@ var Civet = (() => {
|
|
|
3758
3758
|
return Shebang$0(state);
|
|
3759
3759
|
}
|
|
3760
3760
|
}
|
|
3761
|
-
var DirectivePrologue$0 = $
|
|
3762
|
-
return $0.map((p) => p.join(""));
|
|
3763
|
-
});
|
|
3761
|
+
var DirectivePrologue$0 = $Q($S($R$0($EXPECT($R33, fail, "DirectivePrologue /[\\t ]*/")), StringLiteral, $TEXT(StatementDelimiter), EOS));
|
|
3764
3762
|
function DirectivePrologue(state) {
|
|
3765
3763
|
if (state.verbose)
|
|
3766
3764
|
console.log("ENTER:", "DirectivePrologue");
|
|
@@ -3927,7 +3925,7 @@ var Civet = (() => {
|
|
|
3927
3925
|
global.verbose = false;
|
|
3928
3926
|
if (directives) {
|
|
3929
3927
|
const compatRe = /use coffee-compat/;
|
|
3930
|
-
|
|
3928
|
+
module.coffeeCompat = directives.some((d) => d[1].token?.match(compatRe));
|
|
3931
3929
|
}
|
|
3932
3930
|
module.dedentBlockString = function(str) {
|
|
3933
3931
|
const spacing = str.match(/^(\r?\n|\n)\s+/);
|