@lucy/prism 1.7.0 → 1.7.1

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.
Files changed (2) hide show
  1. package/lib/lucy.js +9 -3
  2. package/package.json +1 -1
package/lib/lucy.js CHANGED
@@ -26,9 +26,10 @@ function addLucy(Prism) {
26
26
  {
27
27
  pattern: /\binput(?=\s+[a-zA-Z_])/
28
28
  },
29
- // The values a spawn gives: event.data, and self and parent after
30
- // the = (and parent in send(parent, ...)). An event or a state called
31
- // self or parent is neither.
29
+ // Values, in a spawn's block and as the data of a send: event.data,
30
+ // and self and parent after the = or the comma (and parent in
31
+ // send(parent, ...)). An event or a state called self or parent is
32
+ // neither.
32
33
  {
33
34
  pattern: /\bevent(?=\.data\b)/
34
35
  },
@@ -36,6 +37,11 @@ function addLucy(Prism) {
36
37
  pattern: /([=(]\s*)(?:self|parent)\b/,
37
38
  lookbehind: true
38
39
  },
40
+ // The last argument of a send, not a name in a use list.
41
+ {
42
+ pattern: /(,\s*)(?:self|parent)(?=\s*\))/,
43
+ lookbehind: true
44
+ },
39
45
  {
40
46
  pattern: /\b(?:action|guard)\s+(?!\()\b/,
41
47
  lookbehind: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucy/prism",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Prism plugin for the Lucy language",
5
5
  "main": "lib/main.js",
6
6
  "files": [