lang-feel 0.0.1 → 0.0.3

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/index.cjs CHANGED
@@ -9,32 +9,32 @@ var autocomplete = require('@codemirror/autocomplete');
9
9
  // / A collection of FEEL-related
10
10
  // / [snippets](#autocomplete.snippet).
11
11
  const snippets = [
12
- autocomplete.snippetCompletion('function(${params})\n\t${body}', {
12
+ autocomplete.snippetCompletion('function(${params}) ${body}', {
13
13
  label: 'function',
14
14
  detail: 'definition',
15
15
  type: 'keyword'
16
16
  }),
17
- autocomplete.snippetCompletion('for\n\t${a} in ${b}\nreturn\n\t${a}', {
17
+ autocomplete.snippetCompletion('for ${var} in ${collection} return ${value}', {
18
18
  label: 'for',
19
19
  detail: 'expression',
20
20
  type: 'keyword'
21
21
  }),
22
- autocomplete.snippetCompletion('every\n\t${a} in ${}\nsatisfies\n\t${a}', {
22
+ autocomplete.snippetCompletion('every ${var} in ${collection} satisfies ${condition}', {
23
23
  label: 'every',
24
- detail: 'expression',
24
+ detail: 'quantified expression',
25
25
  type: 'keyword'
26
26
  }),
27
- autocomplete.snippetCompletion('some\n\t${a} in ${}\nsatisfies\n\t${a}', {
27
+ autocomplete.snippetCompletion('some ${var} in ${collection} satisfies ${condition}', {
28
28
  label: 'some',
29
- detail: 'expression',
29
+ detail: 'quantified expression',
30
30
  type: 'keyword'
31
31
  }),
32
- autocomplete.snippetCompletion('if ${} then ${}', {
32
+ autocomplete.snippetCompletion('if ${condition} then ${value}', {
33
33
  label: 'if',
34
34
  detail: 'block',
35
35
  type: 'keyword'
36
36
  }),
37
- autocomplete.snippetCompletion('if ${} then ${} else ${}', {
37
+ autocomplete.snippetCompletion('if ${condition} then ${value} else ${other value}', {
38
38
  label: 'if',
39
39
  detail: '/ else block',
40
40
  type: 'keyword'
@@ -94,9 +94,9 @@ const feelLanguage = language.LRLanguage.define({
94
94
  const unaryTestsLanguage = feelLanguage.configure({ top: 'UnaryTests' });
95
95
  // / Language provider for JSX.
96
96
  const expressionsLanguage = feelLanguage.configure({ top: 'Expressions' });
97
- const keywords = 'for return every some satisfies if then in function'.split(' ').map(kw => ({ label: kw, type: 'keyword' }));
97
+ const keywords = 'return satisfies then in'.split(' ').map(kw => ({ label: kw, type: 'keyword' }));
98
98
  const dontComplete = [
99
- 'String', 'Name',
99
+ 'StringLiteral', 'Name',
100
100
  'LineComment', 'BlockComment'
101
101
  ];
102
102
  // / FEEL support. Includes [snippet](#lang-feel.snippets)
package/dist/index.js CHANGED
@@ -5,32 +5,32 @@ import { snippetCompletion, ifNotIn, completeFromList } from '@codemirror/autoco
5
5
  // / A collection of FEEL-related
6
6
  // / [snippets](#autocomplete.snippet).
7
7
  const snippets = [
8
- /*@__PURE__*/snippetCompletion('function(${params})\n\t${body}', {
8
+ /*@__PURE__*/snippetCompletion('function(${params}) ${body}', {
9
9
  label: 'function',
10
10
  detail: 'definition',
11
11
  type: 'keyword'
12
12
  }),
13
- /*@__PURE__*/snippetCompletion('for\n\t${a} in ${b}\nreturn\n\t${a}', {
13
+ /*@__PURE__*/snippetCompletion('for ${var} in ${collection} return ${value}', {
14
14
  label: 'for',
15
15
  detail: 'expression',
16
16
  type: 'keyword'
17
17
  }),
18
- /*@__PURE__*/snippetCompletion('every\n\t${a} in ${}\nsatisfies\n\t${a}', {
18
+ /*@__PURE__*/snippetCompletion('every ${var} in ${collection} satisfies ${condition}', {
19
19
  label: 'every',
20
- detail: 'expression',
20
+ detail: 'quantified expression',
21
21
  type: 'keyword'
22
22
  }),
23
- /*@__PURE__*/snippetCompletion('some\n\t${a} in ${}\nsatisfies\n\t${a}', {
23
+ /*@__PURE__*/snippetCompletion('some ${var} in ${collection} satisfies ${condition}', {
24
24
  label: 'some',
25
- detail: 'expression',
25
+ detail: 'quantified expression',
26
26
  type: 'keyword'
27
27
  }),
28
- /*@__PURE__*/snippetCompletion('if ${} then ${}', {
28
+ /*@__PURE__*/snippetCompletion('if ${condition} then ${value}', {
29
29
  label: 'if',
30
30
  detail: 'block',
31
31
  type: 'keyword'
32
32
  }),
33
- /*@__PURE__*/snippetCompletion('if ${} then ${} else ${}', {
33
+ /*@__PURE__*/snippetCompletion('if ${condition} then ${value} else ${other value}', {
34
34
  label: 'if',
35
35
  detail: '/ else block',
36
36
  type: 'keyword'
@@ -90,9 +90,9 @@ const feelLanguage = /*@__PURE__*/LRLanguage.define({
90
90
  const unaryTestsLanguage = /*@__PURE__*/feelLanguage.configure({ top: 'UnaryTests' });
91
91
  // / Language provider for JSX.
92
92
  const expressionsLanguage = /*@__PURE__*/feelLanguage.configure({ top: 'Expressions' });
93
- const keywords = /*@__PURE__*/'for return every some satisfies if then in function'.split(' ').map(kw => ({ label: kw, type: 'keyword' }));
93
+ const keywords = /*@__PURE__*/'return satisfies then in'.split(' ').map(kw => ({ label: kw, type: 'keyword' }));
94
94
  const dontComplete = [
95
- 'String', 'Name',
95
+ 'StringLiteral', 'Name',
96
96
  'LineComment', 'BlockComment'
97
97
  ];
98
98
  // / FEEL support. Includes [snippet](#lang-feel.snippets)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lang-feel",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "FEEL language support for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "all": "run-s lint build test",