@exercism/codemirror-lang-pascal 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 +30 -35
  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,50 +1,25 @@
1
1
  # @exercism/codemirror-lang-pascal
2
2
 
3
- This is Exercism's fork of
4
- [@codincod/codemirror-lang-pascal](https://codeberg.org/reeven/codemirror-lang-pascal),
5
- written by CodinCod. Exercism uses it for Delphi Pascal and Free Pascal in the
6
- editor on [exercism.org](https://exercism.org). Our changes are on the
7
- `main` branch.
8
-
9
- The fork adds completion for the names declared in the file, each offered where
10
- it is in scope, and for the members of a class or record after a dot. It also
11
- adds snippets and more SysUtils, StrUtils and Math routines, and turns
12
- completion off inside strings and comments. The grammar also reads Free Pascal's
13
- empty array `()`, an array of one record, and the shift operators `<<` and
14
- `>>`. A directive such as `inline` that follows a top-level header attaches to
15
- that header.
16
-
17
- The package exports `pascal()`, which includes both completion sources,
18
- `pascalLanguage`, `pascalCompletion` (keywords, snippets, types, routines and
19
- units), `localCompletionSource` (the names declared in the file), `snippets`
20
- and `parser`.
21
-
22
- ## Install
23
-
24
- ```
25
- npm install @exercism/codemirror-lang-pascal
26
- ```
27
-
28
- The rest of this README is upstream's.
29
-
30
- ## @codincod/codemirror-lang-pascal
31
-
32
- [ [**CHANGELOG**](https://codeberg.org/reeven/codemirror-lang-pascal/src/branch/master/CHANGELOG.md) ]
3
+ [ [**CHANGELOG**](CHANGELOG.md) ]
33
4
 
34
5
  This package implements Pascal language support for the
35
6
  [CodeMirror](https://codemirror.net/) code editor, using a
36
7
  [Lezer](https://lezer.codemirror.net/) grammar written for this package.
8
+ Exercism uses it in the Delphi Pascal and Free Pascal editors on
9
+ [exercism.org](https://exercism.org).
37
10
 
38
11
  No Lezer grammar for Pascal existed before this one. A Pascal file in a
39
12
  CodeMirror 6 editor was read by the stream mode carried over from CodeMirror 5,
40
13
  which recognises keywords, strings, numbers and comments, and has no tree to
41
14
  fold, indent or navigate by.
42
15
 
43
- Written in part for [CodinCod](https://codincod.com/), a competitive coding
44
- platform, where it colours the editor people solve puzzles in.
16
+ This code is released under an [MIT license](LICENSE).
45
17
 
46
- This code is released under an
47
- [MIT license](https://codeberg.org/reeven/codemirror-lang-pascal/src/branch/master/LICENSE).
18
+ ## Install
19
+
20
+ ```
21
+ npm install @exercism/codemirror-lang-pascal
22
+ ```
48
23
 
49
24
  ## Usage
50
25
 
@@ -85,6 +60,18 @@ end.
85
60
  })
86
61
  ```
87
62
 
63
+ ## Completion
64
+
65
+ Completion offers keywords, snippets, types, routines and units, including
66
+ SysUtils, StrUtils and Math routines. It also offers the names declared in the
67
+ file, each where it is in scope, and the members of a class or record after a
68
+ dot. It offers nothing inside strings and comments.
69
+
70
+ The package exports `pascal()`, which includes both completion sources,
71
+ `pascalLanguage`, `pascalCompletion` (keywords, snippets, types, routines and
72
+ units), `localCompletionSource` (the names declared in the file), `snippets`
73
+ and `parser`.
74
+
88
75
  ## Coverage
89
76
 
90
77
  Object Pascal as Free Pascal and Delphi compile it. Units, programs, libraries
@@ -92,7 +79,10 @@ and packages; classes, records, interfaces, helpers and metaclasses; properties
92
79
  with their specifiers; generics on both the Delphi spelling and the Free Pascal
93
80
  one; variant records; procedural types; RTTI attributes; the whole directive
94
81
  vocabulary; inline variables; anonymous methods; assembler blocks; and every
95
- number and string spelling the two compilers accept.
82
+ number and string spelling the two compilers accept. The grammar also
83
+ reads Free Pascal's empty array `()`, an array of one record, and the shift operators `<<`
84
+ and `>>`. A directive such as `inline` that follows a top-level header attaches
85
+ to that header.
96
86
 
97
87
  Three other dialects are read as far as they go without costing Object Pascal
98
88
  anything. PascalABC.NET has `match`, `yield`, ranges as values, type classes and
@@ -217,3 +207,8 @@ npm install # installs the dependencies and builds the package into dist/
217
207
  npm run build # regenerates the parser, then rebuilds the package
218
208
  npm test # builds the package, then runs the tests
219
209
  ```
210
+
211
+ ## Contributing
212
+
213
+ Please read about how to [contribute to Exercism](https://exercism.org/docs/building).
214
+ 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-pascal",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Pascal language support for the CodeMirror code editor",
5
5
  "keywords": [
6
6
  "codemirror",
@@ -48,7 +48,7 @@
48
48
  "homepage": "https://github.com/exercism/codemirror-lang-pascal",
49
49
  "repository": {
50
50
  "type": "git",
51
- "url": "https://github.com/exercism/codemirror-lang-pascal"
51
+ "url": "git+https://github.com/exercism/codemirror-lang-pascal.git"
52
52
  },
53
53
  "bugs": {
54
54
  "url": "https://github.com/exercism/codemirror-lang-pascal/issues"