@exercism/lezer-java 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/README.md +19 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @lezer/java
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
## Exercism's fork
|
|
4
|
+
|
|
5
|
+
This is Exercism's fork of [@lezer/java](https://code.haverbeke.berlin/lezer/java).
|
|
6
|
+
Exercism uses it, through `@exercism/codemirror-lang-java`, to parse the code in the Java editor on [exercism.org](https://exercism.org).
|
|
7
|
+
It is published on npm as `@exercism/lezer-java`.
|
|
8
|
+
Our changes are on the `exercism` branch, which starts from upstream's 1.2.1 release, and the `main` branch follows upstream.
|
|
9
|
+
Below this section, the README is upstream's.
|
|
8
10
|
|
|
9
11
|
The fork changes two things:
|
|
10
12
|
|
|
11
13
|
- The tokenizer reads `>>` and `>>>` as two or three `>` tokens. Nested generic
|
|
12
|
-
types such as `Map<String, List<String>>`
|
|
13
|
-
|
|
14
|
+
types such as `Map<String, List<String>>` parse. Upstream's tokenizer
|
|
15
|
+
reads the closing `>>` as a shift operator.
|
|
14
16
|
- Inside a module declaration, the words `requires`, `exports`,
|
|
15
17
|
`opens`, `uses`, `provides`, `to`, `with` and `transitive` are
|
|
16
18
|
keywords. Elsewhere they can be
|
|
17
19
|
names, as in `List<Domino> to`.
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
### Install and use
|
|
20
22
|
|
|
21
23
|
To install it, run:
|
|
22
24
|
|
|
@@ -32,9 +34,16 @@ import {parser} from "@exercism/lezer-java"
|
|
|
32
34
|
const tree = parser.parse("class Main {}")
|
|
33
35
|
```
|
|
34
36
|
|
|
37
|
+
### Building and testing
|
|
38
|
+
|
|
35
39
|
To build and test it from a checkout, run `npm install` (which also builds the parser), then `npm test`.
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
### Contributing
|
|
42
|
+
|
|
43
|
+
Contributions to this fork follow the Exercism [Code of Conduct](https://exercism.org/docs/using/legal/code-of-conduct).
|
|
44
|
+
Please read about how to [contribute to Exercism](https://exercism.org/docs/building).
|
|
45
|
+
|
|
46
|
+
---
|
|
38
47
|
|
|
39
48
|
This is a Java grammar for the
|
|
40
49
|
[Lezer](https://lezer.codemirror.net/) parser system.
|