@lucy/prism 1.5.0 → 1.6.0

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 +10 -1
  2. package/package.json +11 -3
package/lib/lucy.js CHANGED
@@ -1,7 +1,12 @@
1
1
  function addLucy(Prism) {
2
2
  Prism.languages.lucy = Prism.languages.extend('clike', {
3
3
  'class-name': [
4
- Prism.languages.clike['class-name']
4
+ Prism.languages.clike['class-name'],
5
+ // The type in `event name(Type)`.
6
+ {
7
+ pattern: /(\bevent\s+[a-zA-Z_]\w*\s*\(\s*)[a-zA-Z_]\w*(?=\s*\))/,
8
+ lookbehind: true
9
+ }
5
10
  ],
6
11
 
7
12
  'keyword': [
@@ -13,6 +18,10 @@ function addLucy(Prism) {
13
18
  pattern: /\b(?:use)\b/,
14
19
  lookbehind: true
15
20
  },
21
+ // `event name`, but not an event called event (`event => idle`).
22
+ {
23
+ pattern: /\bevent(?=\s+[a-zA-Z_])/
24
+ },
16
25
  {
17
26
  pattern: /\b(?:action|guard)\s+(?!\()\b/,
18
27
  lookbehind: true
package/package.json CHANGED
@@ -1,18 +1,26 @@
1
1
  {
2
2
  "name": "@lucy/prism",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Prism plugin for the Lucy language",
5
5
  "main": "lib/main.js",
6
6
  "files": [
7
7
  "lib"
8
8
  ],
9
9
  "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
10
+ "test": "node test/smoke.js"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/lucydsl/lucy-prism.git"
11
15
  },
12
16
  "keywords": [
13
17
  "Lucy",
14
18
  "Prism"
15
19
  ],
16
20
  "author": "Matthew Phillips",
17
- "license": "BSD-2-Clause"
21
+ "license": "BSD-2-Clause",
22
+ "bugs": {
23
+ "url": "https://github.com/lucydsl/lucy-prism/issues"
24
+ },
25
+ "homepage": "https://github.com/lucydsl/lucy-prism#readme"
18
26
  }