codemirror-lang-glimmer 0.0.0-beta.4 → 0.0.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 (55) hide show
  1. package/.eslintrc.cjs +2 -2
  2. package/.turbo/turbo-build.log +5 -21
  3. package/.turbo/turbo-lint$colon$js$colon$fix.log +7 -0
  4. package/.turbo/turbo-lint$colon$js.log +7 -0
  5. package/.turbo/turbo-lint$colon$prettier$colon$fix.log +15 -0
  6. package/.turbo/turbo-lint$colon$prettier.log +9 -0
  7. package/.turbo/turbo-lint$colon$types.log +5 -0
  8. package/CHANGELOG.md +8 -0
  9. package/LICENSE +21 -0
  10. package/dev/.eslintcache +1 -0
  11. package/dev/.eslintrc.cjs +2 -2
  12. package/dev/CHANGELOG.md +3 -0
  13. package/dev/index.html +1 -1
  14. package/dev/index.ts +43 -3
  15. package/dev/node_modules/.bin/eslint +4 -4
  16. package/dev/node_modules/.bin/prettier +4 -4
  17. package/dev/node_modules/.bin/tsc +4 -4
  18. package/dev/node_modules/.bin/tsserver +4 -4
  19. package/dev/node_modules/.bin/vite +4 -4
  20. package/dev/package.json +27 -15
  21. package/dev/watch.cjs +3 -3
  22. package/dist/index.cjs +287 -386
  23. package/dist/index.d.cts +22 -4
  24. package/dist/index.d.ts +22 -4
  25. package/dist/index.js +287 -388
  26. package/package.json +42 -26
  27. package/src/auto-close.ts +91 -0
  28. package/src/glimmer.ts +79 -0
  29. package/src/index.ts +3 -132
  30. package/src/language.ts +176 -0
  31. package/src/snippets.ts +48 -0
  32. package/tsconfig.json +2 -1
  33. package/.eslintignore +0 -2
  34. package/.prettierignore +0 -2
  35. package/.prettierrc.cjs +0 -20
  36. package/dist/index.d.cts.map +0 -1
  37. package/dist/index.d.ts.map +0 -1
  38. package/src/highlight.ts +0 -57
  39. package/src/syntax.grammar +0 -139
  40. package/src/syntax.grammar.d.ts +0 -3
  41. package/src/syntax.grammar.terms.d.ts +0 -14
  42. package/src/tokens.ts +0 -277
  43. package/tests/.eslintrc.cjs +0 -5
  44. package/tests/comments.txt +0 -116
  45. package/tests/complex.txt +0 -24
  46. package/tests/expression.txt +0 -95
  47. package/tests/literals.txt +0 -78
  48. package/tests/node_modules/.bin/eslint +0 -17
  49. package/tests/node_modules/.bin/prettier +0 -17
  50. package/tests/node_modules/.bin/tsc +0 -17
  51. package/tests/node_modules/.bin/tsserver +0 -17
  52. package/tests/numbers.txt +0 -88
  53. package/tests/package.json +0 -25
  54. package/tests/property-paths.txt +0 -79
  55. package/tests/strings.txt +0 -64
@@ -1,95 +0,0 @@
1
- # Minimal
2
-
3
- {{@foo}}
4
-
5
- ==>
6
-
7
- Glimmer(
8
- Expression(
9
- StartStache,
10
- SubExpression(
11
- Value(Property(Argument))
12
- ),
13
- EndStache
14
- )
15
- )
16
-
17
- # Function invocation (compressed)
18
-
19
- {{(myFunction @foo)}}
20
-
21
- ==>
22
-
23
- Glimmer(
24
- Expression(
25
- StartStache,
26
- SubExpression(
27
- Value(
28
- Invocation(
29
- SubExpStart,
30
- SubExpression(
31
- Value(Property),
32
- Text,
33
- Value(Property(Argument))
34
- ),
35
- SubExpEnd
36
- )
37
- )
38
- ),
39
- EndStache
40
- )
41
- )
42
-
43
-
44
-
45
- # Function invocation
46
-
47
- {{ (myFunction @foo) }}
48
-
49
- ==>
50
-
51
- Glimmer(
52
- Expression(
53
- StartStache,
54
- SubExpression(
55
- Value(
56
- Invocation(
57
- SubExpStart,
58
- SubExpression(
59
- Value(PropertyPath(Property)),
60
- Value(PropertyPath(Property(Argument)))
61
- ),
62
- SubExpEnd
63
- )
64
- )
65
- ),
66
- EndStache
67
- )
68
- )
69
-
70
- # Iteration
71
-
72
- {{#each this.foo as |item|}}
73
- {{item}}
74
- {{/each}}
75
-
76
- ==>
77
-
78
- Glimmer(
79
- Expression(ArgumentReference)
80
- )
81
-
82
-
83
- # Multiple
84
-
85
- {{@foo}} {{@bar}}
86
-
87
- ==>
88
-
89
- Glimmer(
90
- Expression(
91
- SubExpression(
92
- Value(Argument)
93
- )
94
- )
95
- )
@@ -1,78 +0,0 @@
1
- # True
2
-
3
- {{true}}
4
-
5
- ==>
6
-
7
- Glimmer(
8
- Expression(
9
- StartStache,
10
- SubExpression(
11
- Value(
12
- BooleanLiteral
13
- )
14
- ),
15
- EndStache
16
- )
17
- )
18
-
19
-
20
-
21
- # False
22
-
23
- {{false}}
24
-
25
- ==>
26
-
27
- Glimmer(
28
- Expression(
29
- StartStache,
30
- SubExpression(
31
- Value(
32
- BooleanLiteral
33
- )
34
- ),
35
- EndStache
36
- )
37
- )
38
-
39
-
40
-
41
- # Null
42
-
43
- {{null}}
44
-
45
- ==>
46
-
47
- Glimmer(
48
- Expression(
49
- StartStache,
50
- SubExpression(
51
- Value(
52
- null
53
- )
54
- ),
55
- EndStache
56
- )
57
- )
58
-
59
-
60
- # Undefined
61
-
62
- {{undefined}}
63
-
64
- ==>
65
-
66
- Glimmer(
67
- Expression(
68
- StartStache,
69
- SubExpression(
70
- Value(
71
- undefined
72
- )
73
- ),
74
- EndStache
75
- )
76
- )
77
-
78
-
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/glimdown/glimdown/node_modules/.pnpm/eslint@8.43.0/node_modules/eslint/bin/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/eslint@8.43.0/node_modules/eslint/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/eslint@8.43.0/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/glimdown/glimdown/node_modules/.pnpm/eslint@8.43.0/node_modules/eslint/bin/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/eslint@8.43.0/node_modules/eslint/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/eslint@8.43.0/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/eslint@8.43.0/node_modules/eslint/bin/eslint.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/eslint@8.43.0/node_modules/eslint/bin/eslint.js" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/glimdown/glimdown/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/prettier@2.8.8/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/glimdown/glimdown/node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/prettier@2.8.8/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/bin-prettier.js" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/prettier@2.8.8/node_modules/prettier/bin-prettier.js" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin/tsc" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin/tsc" "$@"
17
- fi
@@ -1,17 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
- esac
7
-
8
- if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/node_modules"
10
- else
11
- export NODE_PATH="/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/typescript@5.0.4/node_modules:/home/runner/work/glimdown/glimdown/node_modules/.pnpm/node_modules:$NODE_PATH"
12
- fi
13
- if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin/tsserver" "$@"
15
- else
16
- exec node "$basedir/../../../../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/bin/tsserver" "$@"
17
- fi
package/tests/numbers.txt DELETED
@@ -1,88 +0,0 @@
1
- # Simple Integer
2
-
3
- {{42}}
4
-
5
- ==>
6
-
7
- Glimmer(
8
- Expression(
9
- StartStache,
10
- SubExpression(
11
- Value(Number)
12
- ),
13
- EndStache
14
- )
15
- )
16
-
17
-
18
-
19
- # Decimal
20
-
21
- {{42.42}}
22
-
23
- ==>
24
-
25
- Glimmer(
26
- Expression(
27
- StartStache,
28
- SubExpression(
29
- Value(Number)
30
- ),
31
- EndStache
32
- )
33
- )
34
-
35
-
36
- # Multiple Integer
37
-
38
- {{42}} {{24}}
39
-
40
- ==>
41
-
42
- Glimmer(
43
- Expression(
44
- StartStache,
45
- SubExpression(
46
- Value(Number)
47
- ),
48
- EndStache
49
- ),
50
-
51
- Expression(
52
- StartStache,
53
- SubExpression(
54
- Value(Number)
55
- ),
56
- EndStache
57
- )
58
- )
59
-
60
-
61
- # Multiple with Text
62
-
63
- {{42}} and {{24}}
64
-
65
- ==>
66
-
67
- Glimmer(
68
- Expression(
69
- StartStache,
70
- SubExpression(
71
- Value(Number)
72
- ),
73
- EndStache
74
- ),
75
-
76
- Text,
77
-
78
- Expression(
79
- StartStache,
80
- SubExpression(
81
- Value(Number)
82
- ),
83
- EndStache
84
- )
85
- )
86
-
87
-
88
-
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@glimdown/glimmer-tests",
3
- "private": true,
4
- "volta": {
5
- "extends": "../../../../package.json"
6
- },
7
- "devDependencies": {
8
- "@babel/core": "^7.22.5",
9
- "@babel/eslint-parser": "^7.22.5",
10
- "@nullvoxpopuli/eslint-configs": "^3.1.3",
11
- "@typescript-eslint/eslint-plugin": "^5.60.0",
12
- "@typescript-eslint/parser": "^5.60.0",
13
- "eslint": "^8.43.0",
14
- "prettier": "^2.8.8",
15
- "typescript": "^5.0.4"
16
- },
17
- "scripts": {
18
- "lint": "pnpm -w exec lint",
19
- "lint:fix": "pnpm -w exec lint fix",
20
- "lint:js": "pnpm -w exec lint js",
21
- "lint:js:fix": "pnpm -w exec lint js:fix",
22
- "lint:prettier:fix": "pnpm -w exec lint prettier:fix",
23
- "lint:prettier": "pnpm -w exec lint prettier"
24
- }
25
- }
@@ -1,79 +0,0 @@
1
- # foo.bar
2
-
3
- {{foo.bar}}
4
-
5
- ==>
6
-
7
- Glimmer(
8
- Expression(
9
- StartStache,
10
- SubExpression(
11
- Value(
12
- PropertyPath(
13
- Property
14
- )
15
- )
16
- ),
17
- EndStache
18
- )
19
- )
20
-
21
- # foo.bar.baz
22
-
23
- {{foo.bar.baz}}
24
-
25
- ==>
26
-
27
- Glimmer(
28
- Expression(
29
- StartStache,
30
- SubExpression(
31
- Value(
32
- PropertyPath(
33
- Property
34
- )
35
- )
36
- ),
37
- EndStache
38
- )
39
- )
40
-
41
- # this.bar
42
-
43
- {{this.bar}}
44
-
45
- ==>
46
-
47
- Glimmer(
48
- Expression(
49
- StartStache,
50
- SubExpression(
51
- Value(
52
- PropertyPath(
53
- Property(this)
54
- )
55
- )
56
- ),
57
- EndStache
58
- )
59
- )
60
-
61
- # @arg.bar
62
-
63
- {{@arg.bar}}
64
-
65
- ==>
66
-
67
- Glimmer(
68
- Expression(
69
- StartStache,
70
- SubExpression(
71
- Value(
72
- PropertyPath(
73
- Property(Argument)
74
- )
75
- )
76
- ),
77
- EndStache
78
- )
79
- )
package/tests/strings.txt DELETED
@@ -1,64 +0,0 @@
1
- # Basic - Double
2
-
3
- {{"Some String"}}
4
-
5
- ==>
6
-
7
- Glimmer(
8
- Expression(
9
- StartStache,
10
- SubExpression(
11
- Value(String)
12
- ),
13
- EndStache
14
- )
15
- )
16
-
17
- # Basic - Single
18
-
19
- {{'Some String'}}
20
-
21
- ==>
22
-
23
- Glimmer(
24
- Expression(
25
- StartStache,
26
- SubExpression(
27
- Value(String)
28
- ),
29
- EndStache
30
- )
31
- )
32
-
33
- # Nested - Double
34
-
35
- {{"Some 'inner' String"}}
36
-
37
- ==>
38
-
39
- Glimmer(
40
- Expression(
41
- StartStache,
42
- SubExpression(
43
- Value(String)
44
- ),
45
- EndStache
46
- )
47
- )
48
-
49
- # Nested - Single
50
-
51
- {{'Some "inner" String'}}
52
-
53
- ==>
54
-
55
- Glimmer(
56
- Expression(
57
- StartStache,
58
- SubExpression(
59
- Value(String)
60
- ),
61
- EndStache
62
- )
63
- )
64
-