@danielx/civet 0.2.2 → 0.2.5

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/main.js CHANGED
@@ -595,6 +595,10 @@ var require_parser = __commonJS({
595
595
  InterfaceBlock,
596
596
  NestedInterfaceProperties,
597
597
  NestedInterfaceProperty,
598
+ InterfaceProperty,
599
+ InterfacePropertyDelimiter,
600
+ TypeIndexSignature,
601
+ TypeIndex,
598
602
  TypeSuffix,
599
603
  ReturnTypeSuffix,
600
604
  TypePredicate,
@@ -761,12 +765,13 @@ var require_parser = __commonJS({
761
765
  var $L124 = $L("</");
762
766
  var $L125 = $L("<>");
763
767
  var $L126 = $L("</>");
764
- var $L127 = $L("asserts");
765
- var $L128 = $L("keyof");
766
- var $L129 = $L("infer");
767
- var $L130 = $L("[]");
768
- var $L131 = $L(" ");
769
- var $L132 = $L(" ");
768
+ var $L127 = $L("readonly");
769
+ var $L128 = $L("asserts");
770
+ var $L129 = $L("keyof");
771
+ var $L130 = $L("infer");
772
+ var $L131 = $L("[]");
773
+ var $L132 = $L(" ");
774
+ var $L133 = $L(" ");
770
775
  var $R0 = $R(new RegExp("(?!\\p{ID_Continue})", "suy"));
771
776
  var $R1 = $R(new RegExp("(of)(?!\\p{ID_Continue})", "suy"));
772
777
  var $R2 = $R(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy"));
@@ -797,10 +802,12 @@ var require_parser = __commonJS({
797
802
  var $R27 = $R(new RegExp("[^{}<>]+", "suy"));
798
803
  var $R28 = $R(new RegExp("type(?!\\p{ID_Continue})", "suy"));
799
804
  var $R29 = $R(new RegExp("interface(?!\\p{ID_Continue})", "suy"));
800
- var $R30 = $R(new RegExp("#![^\\r\\n]*", "suy"));
801
- var $R31 = $R(new RegExp("[\\t ]*", "suy"));
802
- var $R32 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
803
- var $R33 = $R(new RegExp("$", "suy"));
805
+ var $R30 = $R(new RegExp("[+-]?", "suy"));
806
+ var $R31 = $R(new RegExp("[+-]", "suy"));
807
+ var $R32 = $R(new RegExp("#![^\\r\\n]*", "suy"));
808
+ var $R33 = $R(new RegExp("[\\t ]*", "suy"));
809
+ var $R34 = $R(new RegExp("\\r\\n|\\n|\\r|$", "suy"));
810
+ var $R35 = $R(new RegExp("$", "suy"));
804
811
  var Program$0 = $S(Init, __, $Q(TopLevelStatement), __);
805
812
  function Program(state) {
806
813
  if (state.verbose)
@@ -962,7 +969,7 @@ var require_parser = __commonJS({
962
969
  }
963
970
  }
964
971
  var ArrowFunction$0 = ThinArrowFunction;
965
- var ArrowFunction$1 = $S($C(BindingIdentifier, Parameters), __, $EXPECT($L10, fail, 'ArrowFunction "=>"'), ConciseBody);
972
+ var ArrowFunction$1 = $S($C(BindingIdentifier, Parameters), $E(ReturnTypeSuffix), __, $EXPECT($L10, fail, 'ArrowFunction "=>"'), ConciseBody);
966
973
  function ArrowFunction(state) {
967
974
  if (state.tokenize) {
968
975
  return $TOKEN("ArrowFunction", state, ArrowFunction$0(state) || ArrowFunction$1(state));
@@ -1562,7 +1569,7 @@ var require_parser = __commonJS({
1562
1569
  return ElementList$0(state);
1563
1570
  }
1564
1571
  }
1565
- var ArrayElementExpression$0 = $E($S($E($S($EXPECT($L31, fail, 'ArrayElementExpression "..."'), __)), AssignmentExpression));
1572
+ var ArrayElementExpression$0 = $E($S($E($S($EXPECT($L31, fail, 'ArrayElementExpression "..."'), __)), Expression));
1566
1573
  function ArrayElementExpression(state) {
1567
1574
  if (state.verbose)
1568
1575
  console.log("ENTER:", "ArrayElementExpression");
@@ -2861,12 +2868,13 @@ var require_parser = __commonJS({
2861
2868
  }
2862
2869
  }
2863
2870
  var InterfaceBlock$0 = $S(__, $EXPECT($L11, fail, 'InterfaceBlock "{"'), EOS, NestedInterfaceProperties, __, $EXPECT($L16, fail, 'InterfaceBlock "}"'));
2864
- var InterfaceBlock$1 = $S(InsertOpenBrace, EOS, NestedInterfaceProperties, InsertNewline, InsertIndent, InsertCloseBrace);
2871
+ var InterfaceBlock$1 = $S(__, $EXPECT($L11, fail, 'InterfaceBlock "{"'), $Q($S(__, InterfaceProperty)), __, $EXPECT($L16, fail, 'InterfaceBlock "}"'));
2872
+ var InterfaceBlock$2 = $S(InsertOpenBrace, EOS, NestedInterfaceProperties, InsertNewline, InsertIndent, InsertCloseBrace);
2865
2873
  function InterfaceBlock(state) {
2866
2874
  if (state.tokenize) {
2867
- return $TOKEN("InterfaceBlock", state, InterfaceBlock$0(state) || InterfaceBlock$1(state));
2875
+ return $TOKEN("InterfaceBlock", state, InterfaceBlock$0(state) || InterfaceBlock$1(state) || InterfaceBlock$2(state));
2868
2876
  } else {
2869
- return InterfaceBlock$0(state) || InterfaceBlock$1(state);
2877
+ return InterfaceBlock$0(state) || InterfaceBlock$1(state) || InterfaceBlock$2(state);
2870
2878
  }
2871
2879
  }
2872
2880
  var NestedInterfaceProperties$0 = $TS($S(PushIndent, $Q(NestedInterfaceProperty), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
@@ -2884,7 +2892,7 @@ var require_parser = __commonJS({
2884
2892
  return NestedInterfaceProperties$0(state);
2885
2893
  }
2886
2894
  }
2887
- var NestedInterfaceProperty$0 = $S(Nested, PropertyName, TypeSuffix, StatementDelimiter);
2895
+ var NestedInterfaceProperty$0 = $S(Nested, InterfaceProperty);
2888
2896
  function NestedInterfaceProperty(state) {
2889
2897
  if (state.verbose)
2890
2898
  console.log("ENTER:", "NestedInterfaceProperty");
@@ -2894,6 +2902,50 @@ var require_parser = __commonJS({
2894
2902
  return NestedInterfaceProperty$0(state);
2895
2903
  }
2896
2904
  }
2905
+ var InterfaceProperty$0 = $S($C(TypeIndexSignature, PropertyName), TypeSuffix, InterfacePropertyDelimiter);
2906
+ function InterfaceProperty(state) {
2907
+ if (state.verbose)
2908
+ console.log("ENTER:", "InterfaceProperty");
2909
+ if (state.tokenize) {
2910
+ return $TOKEN("InterfaceProperty", state, InterfaceProperty$0(state));
2911
+ } else {
2912
+ return InterfaceProperty$0(state);
2913
+ }
2914
+ }
2915
+ var InterfacePropertyDelimiter$0 = $S($Q(_), $EXPECT($L85, fail, 'InterfacePropertyDelimiter ";"'));
2916
+ var InterfacePropertyDelimiter$1 = $Y($S($Q(_), $EXPECT($L16, fail, 'InterfacePropertyDelimiter "}"')));
2917
+ var InterfacePropertyDelimiter$2 = $T($Y($S(__, $EXPECT($L16, fail, 'InterfacePropertyDelimiter "}"'))), function(value) {
2918
+ return ";";
2919
+ });
2920
+ var InterfacePropertyDelimiter$3 = $T($Y(EOS), function(value) {
2921
+ return ";";
2922
+ });
2923
+ function InterfacePropertyDelimiter(state) {
2924
+ if (state.tokenize) {
2925
+ return $TOKEN("InterfacePropertyDelimiter", state, InterfacePropertyDelimiter$0(state) || InterfacePropertyDelimiter$1(state) || InterfacePropertyDelimiter$2(state) || InterfacePropertyDelimiter$3(state));
2926
+ } else {
2927
+ return InterfacePropertyDelimiter$0(state) || InterfacePropertyDelimiter$1(state) || InterfacePropertyDelimiter$2(state) || InterfacePropertyDelimiter$3(state);
2928
+ }
2929
+ }
2930
+ var TypeIndexSignature$0 = $S($E($S($R$0($EXPECT($R30, fail, "TypeIndexSignature /[+-]?/")), $EXPECT($L127, fail, 'TypeIndexSignature "readonly"'), __)), $EXPECT($L24, fail, 'TypeIndexSignature "["'), TypeIndex, $EXPECT($L25, fail, 'TypeIndexSignature "]"'), $E($S(__, $R$0($EXPECT($R31, fail, "TypeIndexSignature /[+-]/")), $EXPECT($L3, fail, 'TypeIndexSignature "?"'))));
2931
+ function TypeIndexSignature(state) {
2932
+ if (state.verbose)
2933
+ console.log("ENTER:", "TypeIndexSignature");
2934
+ if (state.tokenize) {
2935
+ return $TOKEN("TypeIndexSignature", state, TypeIndexSignature$0(state));
2936
+ } else {
2937
+ return TypeIndexSignature$0(state);
2938
+ }
2939
+ }
2940
+ var TypeIndex$0 = $S(__, Identifier, TypeSuffix);
2941
+ var TypeIndex$1 = $S(__, PropertyName, __, $EXPECT($L78, fail, 'TypeIndex "in"'), Type, $E($S(__, $EXPECT($L4, fail, 'TypeIndex "as"'), Type)));
2942
+ function TypeIndex(state) {
2943
+ if (state.tokenize) {
2944
+ return $TOKEN("TypeIndex", state, TypeIndex$0(state) || TypeIndex$1(state));
2945
+ } else {
2946
+ return TypeIndex$0(state) || TypeIndex$1(state);
2947
+ }
2948
+ }
2897
2949
  var TypeSuffix$0 = $T($S($E($EXPECT($L3, fail, 'TypeSuffix "?"')), __, $EXPECT($L12, fail, 'TypeSuffix ":"'), Type), function(value) {
2898
2950
  return { "ts": true, "children": value };
2899
2951
  });
@@ -2906,7 +2958,7 @@ var require_parser = __commonJS({
2906
2958
  return TypeSuffix$0(state);
2907
2959
  }
2908
2960
  }
2909
- var ReturnTypeSuffix$0 = $T($S(__, $EXPECT($L12, fail, 'ReturnTypeSuffix ":"'), $E($S(__, $EXPECT($L127, fail, 'ReturnTypeSuffix "asserts"'), $EXPECT($R0, fail, "ReturnTypeSuffix /(?!\\p{ID_Continue})/"))), TypePredicate), function(value) {
2961
+ var ReturnTypeSuffix$0 = $T($S(__, $EXPECT($L12, fail, 'ReturnTypeSuffix ":"'), $E($S(__, $EXPECT($L128, fail, 'ReturnTypeSuffix "asserts"'), $EXPECT($R0, fail, "ReturnTypeSuffix /(?!\\p{ID_Continue})/"))), TypePredicate), function(value) {
2910
2962
  return { "ts": true, "children": value };
2911
2963
  });
2912
2964
  function ReturnTypeSuffix(state) {
@@ -2968,9 +3020,9 @@ var require_parser = __commonJS({
2968
3020
  return TypeUnarySuffix$0(state);
2969
3021
  }
2970
3022
  }
2971
- var TypeUnaryOp$0 = $EXPECT($L128, fail, 'TypeUnaryOp "keyof"');
3023
+ var TypeUnaryOp$0 = $EXPECT($L129, fail, 'TypeUnaryOp "keyof"');
2972
3024
  var TypeUnaryOp$1 = $EXPECT($L84, fail, 'TypeUnaryOp "typeof"');
2973
- var TypeUnaryOp$2 = $EXPECT($L129, fail, 'TypeUnaryOp "infer"');
3025
+ var TypeUnaryOp$2 = $EXPECT($L130, fail, 'TypeUnaryOp "infer"');
2974
3026
  function TypeUnaryOp(state) {
2975
3027
  if (state.tokenize) {
2976
3028
  return $TOKEN("TypeUnaryOp", state, TypeUnaryOp$0(state) || TypeUnaryOp$1(state) || TypeUnaryOp$2(state));
@@ -3000,7 +3052,7 @@ var require_parser = __commonJS({
3000
3052
  return TypePrimary$0(state) || TypePrimary$1(state) || TypePrimary$2(state) || TypePrimary$3(state) || TypePrimary$4(state);
3001
3053
  }
3002
3054
  }
3003
- var TypeConditional$0 = $S(TypeBinary, $E($S(__, $EXPECT($L15, fail, 'TypeConditional "extends"'), Type, __, $EXPECT($L3, fail, 'TypeConditional "?"'), Type, __, $EXPECT($L12, fail, 'TypeConditional ":"'), Type)));
3055
+ var TypeConditional$0 = $S(TypeBinary, $E($S(__, $EXPECT($L15, fail, 'TypeConditional "extends"'), Type, $E($S(__, $EXPECT($L3, fail, 'TypeConditional "?"'), Type, __, $EXPECT($L12, fail, 'TypeConditional ":"'), Type)))));
3004
3056
  function TypeConditional(state) {
3005
3057
  if (state.verbose)
3006
3058
  console.log("ENTER:", "TypeConditional");
@@ -3012,7 +3064,7 @@ var require_parser = __commonJS({
3012
3064
  }
3013
3065
  var TypeLiteral$0 = Literal;
3014
3066
  var TypeLiteral$1 = $EXPECT($L83, fail, 'TypeLiteral "void"');
3015
- var TypeLiteral$2 = $EXPECT($L130, fail, 'TypeLiteral "[]"');
3067
+ var TypeLiteral$2 = $EXPECT($L131, fail, 'TypeLiteral "[]"');
3016
3068
  function TypeLiteral(state) {
3017
3069
  if (state.tokenize) {
3018
3070
  return $TOKEN("TypeLiteral", state, TypeLiteral$0(state) || TypeLiteral$1(state) || TypeLiteral$2(state));
@@ -3094,7 +3146,7 @@ var require_parser = __commonJS({
3094
3146
  return TypeParameterDelimiter$0(state) || TypeParameterDelimiter$1(state) || TypeParameterDelimiter$2(state) || TypeParameterDelimiter$3(state);
3095
3147
  }
3096
3148
  }
3097
- var Shebang$0 = $R$0($EXPECT($R30, fail, "Shebang /#![^\\r\\n]*/"));
3149
+ var Shebang$0 = $R$0($EXPECT($R32, fail, "Shebang /#![^\\r\\n]*/"));
3098
3150
  function Shebang(state) {
3099
3151
  if (state.verbose)
3100
3152
  console.log("ENTER:", "Shebang");
@@ -3104,7 +3156,7 @@ var require_parser = __commonJS({
3104
3156
  return Shebang$0(state);
3105
3157
  }
3106
3158
  }
3107
- var DirectivePrologue$0 = $TV($Q($S($TEXT($EXPECT($R31, fail, "DirectivePrologue /[\\t ]*/")), $TEXT(StringLiteral), $TEXT(StatementDelimiter), $TEXT(EOS))), function($skip, $loc, $0, $1) {
3159
+ var DirectivePrologue$0 = $TV($Q($S($TEXT($EXPECT($R33, fail, "DirectivePrologue /[\\t ]*/")), $TEXT(StringLiteral), $TEXT(StatementDelimiter), $TEXT(EOS))), function($skip, $loc, $0, $1) {
3108
3160
  return $0.map((p) => p.join(""));
3109
3161
  });
3110
3162
  function DirectivePrologue(state) {
@@ -3126,7 +3178,7 @@ var require_parser = __commonJS({
3126
3178
  return EOS$0(state);
3127
3179
  }
3128
3180
  }
3129
- var EOL$0 = $R$0($EXPECT($R32, fail, "EOL /\\r\\n|\\n|\\r|$/"));
3181
+ var EOL$0 = $R$0($EXPECT($R34, fail, "EOL /\\r\\n|\\n|\\r|$/"));
3130
3182
  function EOL(state) {
3131
3183
  if (state.verbose)
3132
3184
  console.log("ENTER:", "EOL");
@@ -3136,7 +3188,7 @@ var require_parser = __commonJS({
3136
3188
  return EOL$0(state);
3137
3189
  }
3138
3190
  }
3139
- var EOF$0 = $R$0($EXPECT($R33, fail, "EOF /$/"));
3191
+ var EOF$0 = $R$0($EXPECT($R35, fail, "EOF /$/"));
3140
3192
  function EOF(state) {
3141
3193
  if (state.verbose)
3142
3194
  console.log("ENTER:", "EOF");
@@ -3274,7 +3326,7 @@ var require_parser = __commonJS({
3274
3326
  return Init$0(state);
3275
3327
  }
3276
3328
  }
3277
- var Indent$0 = $TV($Q($C($EXPECT($L131, fail, 'Indent " "'), $EXPECT($L132, fail, 'Indent "\\\\t"'))), function($skip, $loc, $0, $1) {
3329
+ var Indent$0 = $TV($Q($C($EXPECT($L132, fail, 'Indent " "'), $EXPECT($L133, fail, 'Indent "\\\\t"'))), function($skip, $loc, $0, $1) {
3278
3330
  return $1.length;
3279
3331
  });
3280
3332
  function Indent(state) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
4
4
  "description": "CoffeeScript style syntax for TypeScript",
5
5
  "main": "dist/main.js",
6
6
  "bin": {