@danielx/civet 0.4.28 → 0.4.29

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/README.md CHANGED
@@ -55,10 +55,8 @@ Things Kept from CoffeeScript
55
55
  ---
56
56
 
57
57
  - `is` -> `===`
58
- - `or` -> `||`
59
- - `and` -> `&&`
60
- - `or=` -> `||=`
61
- - `and=` -> `&&=`
58
+ - `or`, `or=` -> `||`, `||=`
59
+ - `and`, `and=` -> `&&`, `&&=`
62
60
  - `loop` -> `while(true)`
63
61
  - `unless exp` -> `if(!exp)`
64
62
  - `until condition` -> `while(!condition)`
@@ -123,9 +121,7 @@ Civet.
123
121
  - `a of b` (use `a in b` matching JS, or `"civet coffeeCompat"`, or `"civet coffeeOf"`)
124
122
  - Backtick embedded JS (replaced by template literals)
125
123
  - Will likely add later
126
- - Optional assignment `x?.y = 3` -> `x != null ? x.y = 3 : undefined`
127
124
  - Conditional assignment `a?[x] = 3` -> `a ? a[x] = 3 : undefined`
128
- - Might add later
129
125
  - Multiple slice assignment `otherNumbers[0...] = numbers[3..6] = [-3, -4, -5, -6]`
130
126
 
131
127
  Things Changed from CoffeeScript
@@ -156,7 +152,8 @@ Things Changed from CoffeeScript
156
152
  x + 3
157
153
  ```
158
154
  remains as is.
159
- - Heregex
155
+ - Heregex / re.X
156
+ - Stay closer to the [Python spec](https://docs.python.org/3/library/re.html#re.X)
160
157
  - Allows both kinds of substitutions `#{..}`, `${..}`.
161
158
  - Also allows both kinds of single line comments `//`, `#`.
162
159
  - Keeps non-newline whitespace inside of character classes.
package/dist/browser.js CHANGED
@@ -4780,7 +4780,14 @@ ${input.slice(result.pos)}
4780
4780
  };
4781
4781
  });
4782
4782
  var PropertyDefinition$1 = NamedProperty;
4783
- var PropertyDefinition$2 = MethodDefinition;
4783
+ var PropertyDefinition$2 = $TS($S(__, MethodDefinition), function($skip, $loc, $0, $1, $2) {
4784
+ var ws = $1;
4785
+ var def = $2;
4786
+ return {
4787
+ ...def,
4788
+ children: [...ws, ...def.children]
4789
+ };
4790
+ });
4784
4791
  var PropertyDefinition$3 = $TS($S(__, DotDotDot, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
4785
4792
  var ws = $1;
4786
4793
  var dots = $2;
package/dist/main.js CHANGED
@@ -4779,7 +4779,14 @@ ${input.slice(result.pos)}
4779
4779
  };
4780
4780
  });
4781
4781
  var PropertyDefinition$1 = NamedProperty;
4782
- var PropertyDefinition$2 = MethodDefinition;
4782
+ var PropertyDefinition$2 = $TS($S(__, MethodDefinition), function($skip, $loc, $0, $1, $2) {
4783
+ var ws = $1;
4784
+ var def = $2;
4785
+ return {
4786
+ ...def,
4787
+ children: [...ws, ...def.children]
4788
+ };
4789
+ });
4783
4790
  var PropertyDefinition$3 = $TS($S(__, DotDotDot, ExtendedExpression), function($skip, $loc, $0, $1, $2, $3) {
4784
4791
  var ws = $1;
4785
4792
  var dots = $2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
- "version": "0.4.28",
3
+ "version": "0.4.29",
4
4
  "description": "CoffeeScript style syntax for TypeScript",
5
5
  "main": "dist/main.js",
6
6
  "exports": {