@exercism/codemirror-lang-cpp 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.
- package/CHANGELOG.md +4 -0
- package/README.md +21 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<!-- NOTE: README.md is generated from src/README.md -->
|
|
2
2
|
|
|
3
|
-
# @
|
|
3
|
+
# @codemirror/lang-cpp [](https://www.npmjs.org/package/@codemirror/lang-cpp)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
## Exercism's fork
|
|
6
|
+
|
|
7
|
+
This is Exercism's fork of [@codemirror/lang-cpp](https://code.haverbeke.berlin/codemirror/lang-cpp).
|
|
8
|
+
Exercism uses it in the C, C++ and Objective-C editors on [exercism.org](https://exercism.org).
|
|
9
|
+
It is published on npm as `@exercism/codemirror-lang-cpp`.
|
|
10
|
+
Our changes are on the `exercism` branch, and the `main` branch follows upstream.
|
|
11
|
+
Below this section, the README is upstream's.
|
|
9
12
|
|
|
10
13
|
The fork adds autocomplete to the upstream package. Use `cpp()` for C++
|
|
11
14
|
and `c()` for C. Both use the same parser, `@exercism/lezer-cpp`, and offer different names.
|
|
@@ -50,27 +53,32 @@ sends, `@` literals and blocks to C.
|
|
|
50
53
|
- It offers the names declared in the file where they are in scope:
|
|
51
54
|
classes, protocols, `NS_ENUM` types and their values, properties and
|
|
52
55
|
their `_name` instance variables, instance variables, C functions and
|
|
53
|
-
variables, and the parameters of methods,
|
|
54
|
-
|
|
56
|
+
variables, `for ... in` loop variables, and the parameters of methods,
|
|
57
|
+
blocks and functions.
|
|
55
58
|
- Inside `#import <...>`, it offers `Foundation/Foundation.h` and the C
|
|
56
59
|
headers.
|
|
57
60
|
|
|
58
61
|
Completion stays quiet in strings and comments, and after `.`, `->`
|
|
59
62
|
or `::` (apart from `std::`).
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
### Install
|
|
62
65
|
|
|
63
66
|
```
|
|
64
67
|
npm install @exercism/codemirror-lang-cpp
|
|
65
68
|
```
|
|
66
69
|
|
|
70
|
+
### Building and testing
|
|
71
|
+
|
|
67
72
|
To build and test it from a checkout, run `npm install` (which also builds the package), then `npm test`.
|
|
68
73
|
|
|
69
|
-
|
|
74
|
+
### Contributing
|
|
75
|
+
|
|
76
|
+
Contributions to this fork follow the Exercism [Code of Conduct](https://exercism.org/docs/using/legal/code-of-conduct).
|
|
77
|
+
Please read about how to [contribute to Exercism](https://exercism.org/docs/building).
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
---
|
|
72
80
|
|
|
73
|
-
[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://code.haverbeke.berlin/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/) | [**CHANGELOG**](https://code.haverbeke.berlin/codemirror/lang-cpp/src/branch/main/CHANGELOG.md) ]
|
|
81
|
+
[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://code.haverbeke.berlin/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://code.haverbeke.berlin/codemirror/lang-cpp/src/branch/main/CHANGELOG.md) ]
|
|
74
82
|
|
|
75
83
|
This package implements C++ language support for the
|
|
76
84
|
[CodeMirror](https://codemirror.net/) code editor.
|
|
@@ -87,7 +95,7 @@ we have a [code of
|
|
|
87
95
|
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
|
|
88
96
|
to communication around the project.
|
|
89
97
|
|
|
90
|
-
|
|
98
|
+
## Usage
|
|
91
99
|
|
|
92
100
|
```javascript
|
|
93
101
|
import {EditorView, basicSetup} from "codemirror"
|
|
@@ -100,7 +108,7 @@ const view = new EditorView({
|
|
|
100
108
|
})
|
|
101
109
|
```
|
|
102
110
|
|
|
103
|
-
|
|
111
|
+
## API Reference
|
|
104
112
|
|
|
105
113
|
<dl>
|
|
106
114
|
<dt id="user-content-cpp">
|
package/package.json
CHANGED