@exercism/codemirror-lang-tcl 1.0.0 → 1.0.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 (3) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +33 -37
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.1
2
+
3
+ The README is restructured. This release is the first published from GitHub Actions, with npm provenance.
4
+
1
5
  ## 1.0.0
2
6
 
3
7
  This is Exercism's first release of the package, published as
package/README.md CHANGED
@@ -1,38 +1,5 @@
1
1
  # @exercism/codemirror-lang-tcl
2
2
 
3
- ## This fork
4
-
5
- This is Exercism's fork of
6
- [`@codincod/codemirror-lang-tcl`](https://codeberg.org/reeven/codemirror-lang-tcl)
7
- by CodinCod, released under the MIT license. Exercism uses it in the Tcl
8
- editor on [exercism.org](https://exercism.org). Our changes are on the
9
- `main` branch, and are published as `@exercism/codemirror-lang-tcl`.
10
-
11
- The fork adds completion to the package:
12
-
13
- - The commands that are available when `tclsh` starts, and snippets for `proc`, `if` (with
14
- `else` and `elseif`), `for`, `foreach`, `while`, `switch`, `namespace eval`,
15
- `dict for` and `try`.
16
- - The subcommands of `string`, `dict`, `array`, `info`, `file`, `namespace`,
17
- `clock`, `chan` and `binary`, the classes of `string is`, and the switches
18
- of `lsort`, `lsearch`, `regexp`, `regsub`, `switch` and a few others once a
19
- `-` is typed.
20
- - The functions of `expr` inside an expression.
21
- - The procs and namespaces in the file, everywhere. A proc inside
22
- `namespace eval` is offered by its own name and by its qualified name.
23
- - The variables in scope, once they have been declared. Inside a proc body, completion
24
- offers its parameters, its own variables, and the names declared with `global`
25
- or `upvar`. Completion picks up variables from `set`, `foreach`, `lassign`, `incr`,
26
- `append`, `lappend`, `variable`, `dict for` and a few others.
27
-
28
- Completion switches off in comments. Inside a quoted string, variables are offered
29
- after a `$`, and code inside `[...]` is completed like any other code.
30
-
31
- To read the declared names from the tree, the grammar gives `set` and
32
- `namespace eval` nodes of their own: `SetCommand` with a `VariableDefinition`,
33
- and `NamespaceCommand` with a `NamespaceName`.
34
-
35
-
36
3
  This package implements [Tcl](https://www.tcl-lang.org/) language support for
37
4
  the [CodeMirror](https://codemirror.net/) code editor: a
38
5
  [Lezer](https://lezer.codemirror.net/) grammar, highlighting, indentation,
@@ -48,11 +15,9 @@ that mode was still in use.
48
15
  This one reads 99.00% of those snippets with no error node, and 96.41% of the
49
16
  Tcl core, Tk, tcllib and tklib: 2283 files, 33 MiB.
50
17
 
51
- Written in part for CodinCod, a competitive coding platform, where it colours
52
- the editor people solve puzzles in.
18
+ Exercism uses this package in the Tcl editor on [exercism.org](https://exercism.org).
53
19
 
54
- This code is released under an
55
- [MIT license](https://codeberg.org/reeven/codemirror-lang-tcl/src/branch/master/LICENSE).
20
+ This code is released under an [MIT license](LICENSE).
56
21
 
57
22
  ## Install
58
23
 
@@ -81,6 +46,32 @@ puts [fact 10]
81
46
  })
82
47
  ```
83
48
 
49
+ ## Completion
50
+
51
+ Completion offers:
52
+
53
+ - The commands that are available when `tclsh` starts, and snippets for `proc`, `if` (with
54
+ `else` and `elseif`), `for`, `foreach`, `while`, `switch`, `namespace eval`,
55
+ `dict for` and `try`.
56
+ - The subcommands of `string`, `dict`, `array`, `info`, `file`, `namespace`,
57
+ `clock`, `chan` and `binary`, the classes of `string is`, and the switches
58
+ of `lsort`, `lsearch`, `regexp`, `regsub`, `switch` and a few others once a
59
+ `-` is typed.
60
+ - The functions of `expr` inside an expression.
61
+ - The procs and namespaces in the file, everywhere. A proc inside
62
+ `namespace eval` is offered by its own name and by its qualified name.
63
+ - The variables in scope, once they have been declared. Inside a proc body, completion
64
+ offers its parameters, its own variables, and the names declared with `global`
65
+ or `upvar`. Completion picks up variables from `set`, `foreach`, `lassign`, `incr`,
66
+ `append`, `lappend`, `variable`, `dict for` and a few others.
67
+
68
+ Completion switches off in comments. Inside a quoted string, variables are offered
69
+ after a `$`, and code inside `[...]` is completed like any other code.
70
+
71
+ To read the declared names from the tree, the grammar gives `set` and
72
+ `namespace eval` nodes of their own: `SetCommand` with a `VariableDefinition`,
73
+ and `NamespaceCommand` with a `NamespaceName`.
74
+
84
75
  ## What a braced word holds
85
76
 
86
77
  Tcl has no expression syntax and no statement syntax. A script is commands, a
@@ -128,3 +119,8 @@ npm install # installs the dependencies and builds dist/
128
119
  npm run build # regenerates the parser and rebuilds dist/
129
120
  npm test # builds, then runs the tests
130
121
  ```
122
+
123
+ ## Contributing
124
+
125
+ Please read about how to [contribute to Exercism](https://exercism.org/docs/building).
126
+ Be sure to read the Exercism [Code of Conduct](https://exercism.org/docs/using/legal/code-of-conduct).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exercism/codemirror-lang-tcl",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Tcl language support for the CodeMirror code editor, with completion, as used on Exercism",
5
5
  "keywords": [
6
6
  "codemirror",
@@ -46,7 +46,7 @@
46
46
  "homepage": "https://github.com/exercism/codemirror-lang-tcl",
47
47
  "repository": {
48
48
  "type": "git",
49
- "url": "https://github.com/exercism/codemirror-lang-tcl"
49
+ "url": "git+https://github.com/exercism/codemirror-lang-tcl.git"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"