@exercism/lezer-php 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 (2) hide show
  1. package/README.md +21 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,13 +1,20 @@
1
- # @exercism/lezer-php
1
+ # @lezer/php
2
2
 
3
- This is Exercism's fork of `@lezer/php`, published as
4
- `@exercism/lezer-php`. Our changes live on the `exercism` branch:
3
+ ## Exercism's fork
5
4
 
6
- - `from` can be used as a function or method name.
7
- - `foreach ($xs as &$x)` and `foreach ($xs as $k => &$x)` parse.
8
- - `class` and `static` are case-insensitive, like every other keyword.
5
+ This is Exercism's fork of [@lezer/php](https://code.haverbeke.berlin/lezer/php).
6
+ Exercism uses it, through `@exercism/codemirror-lang-php`, to parse the code in the PHP editor on [exercism.org](https://exercism.org).
7
+ It is published on npm as `@exercism/lezer-php`.
8
+ Our changes are on the `exercism` branch, and the `main` branch follows upstream.
9
+ Below this section, the README is upstream's.
9
10
 
10
- ## Install and use
11
+ The fork parses these, which upstream reports as errors:
12
+
13
+ - `from` used as a function or method name.
14
+ - `foreach ($xs as &$x)` and `foreach ($xs as $k => &$x)`.
15
+ - `class` and `static` in any case, like every other keyword.
16
+
17
+ ### Install and use
11
18
 
12
19
  To install it, run:
13
20
 
@@ -23,11 +30,16 @@ import {parser} from "@exercism/lezer-php"
23
30
  const tree = parser.parse("<?php echo 1;")
24
31
  ```
25
32
 
33
+ ### Building and testing
34
+
26
35
  To build and test it from a checkout, run `npm install` (which also builds the parser), then `npm test`.
27
36
 
28
- The upstream README follows.
37
+ ### Contributing
38
+
39
+ Contributions to this fork follow the Exercism [Code of Conduct](https://exercism.org/docs/using/legal/code-of-conduct).
40
+ Please read about how to [contribute to Exercism](https://exercism.org/docs/building).
29
41
 
30
- ## @lezer/php
42
+ ---
31
43
 
32
44
  This is a PHP grammar for the
33
45
  [Lezer](https://lezer.codemirror.net/) parser system.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exercism/lezer-php",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Lezer-based PHP grammar, with fixes for Exercism",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",