@danielx/civet 0.3.8 → 0.3.9

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 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 (global.coffeeCompat)
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 (global.coffeeCompat)
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 (!global.coffeeCompat)
3113
+ if (!module.coffeeCompat)
3114
3114
  return $skip;
3115
3115
  return ["//", $1];
3116
3116
  });
@@ -3758,9 +3758,7 @@ var Civet = (() => {
3758
3758
  return Shebang$0(state);
3759
3759
  }
3760
3760
  }
3761
- var DirectivePrologue$0 = $TV($Q($S($TEXT($EXPECT($R33, fail, "DirectivePrologue /[\\t ]*/")), $TEXT(StringLiteral), $TEXT(StatementDelimiter), $TEXT(EOS))), function($skip, $loc, $0, $1) {
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
- global.coffeeCompat = directives.some((d) => d.match(compatRe));
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+/);