@exercism/lezer-julia 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 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
# `@
|
|
1
|
+
# `@plutojl/lezer-julia` [](https://www.npmjs.org/package/@plutojl/lezer-julia)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
## Exercism's fork
|
|
4
|
+
|
|
5
|
+
This is Exercism's fork of [`@plutojl/lezer-julia`](https://github.com/JuliaPluto/lezer-julia), by the Pluto team.
|
|
6
|
+
Exercism uses it, through `@exercism/codemirror-lang-julia`, to parse the code in the Julia editor on [exercism.org](https://exercism.org).
|
|
7
|
+
It is published on npm as `@exercism/lezer-julia`.
|
|
8
|
+
Our changes are on the `exercism` branch, and the `main` branch follows upstream.
|
|
9
|
+
Below this section, the README is upstream's.
|
|
10
|
+
|
|
11
|
+
The fork makes these changes:
|
|
7
12
|
|
|
8
13
|
- In `if f(x)` and `for x in f(y)`, the parser sees `f(x)` and `f(y)` as function calls. Upstream took `f` as the whole condition and `(x)` as the start of the body.
|
|
9
14
|
- The middle part of a ternary can be a comparison or an assignment (`c ? a < b : d`, `c ? x = 1 : f(x)`).
|
|
@@ -12,7 +17,7 @@ They make these differences from upstream:
|
|
|
12
17
|
- The tokenizer reads string content in longer chunks, which makes files with many strings parse about twice as fast.
|
|
13
18
|
- The tokenizer decides how to read `f(`, `x.` and similar text from the surrounding code. The GLR notes in `CLAUDE.md` explain why.
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
### Install and use
|
|
16
21
|
|
|
17
22
|
To install it, run:
|
|
18
23
|
|
|
@@ -28,9 +33,16 @@ import {parser} from "@exercism/lezer-julia"
|
|
|
28
33
|
const tree = parser.parse("f(x) = 2x")
|
|
29
34
|
```
|
|
30
35
|
|
|
36
|
+
### Building and testing
|
|
37
|
+
|
|
31
38
|
To build and test it from a checkout, run `npm install` and then `npm test`. `npm install` builds the parser, which takes about 2 minutes.
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
### Contributing
|
|
41
|
+
|
|
42
|
+
Contributions to this fork follow the Exercism [Code of Conduct](https://exercism.org/docs/using/legal/code-of-conduct).
|
|
43
|
+
Please read about how to [contribute to Exercism](https://exercism.org/docs/building).
|
|
44
|
+
|
|
45
|
+
---
|
|
34
46
|
|
|
35
47
|
This is a [Julia](https://julialang.org) grammar for the
|
|
36
48
|
[lezer](https://lezer.codemirror.net) parser system.
|