Error on Parser::parse when a file doesn't have expressions (max 3 lines)
- Dominant language
- Rust
- Stars
- 103
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Given this file then execute `scrap code $file -f xstate`:
3 lines empty.scl
```scl
```
will produce:
```console
ERROR: can't parse
---
--> examples/test.scl:3:1
|
3 |
| ^---
|
= expected expression
---
```
3 lines with comment.scl
```scl
// A -> B @ Click
// A <-> B @ Toggle
// ->> B @ Click
```
will produce:
```console
ERROR: can't parse
---
--> examples/test.scl:3:17
|
3 | // ->> B @ Click
| ^---
|
= expected expression
---
```
end with with comment.scl
```scl
// A -> B @ Click
// ->> B @ Click
```
will produce:
```console
ERROR: can't parse
---
--> examples/test.scl:3:17
|
3 | // ->> B @ Click
| ^---
|
= expected expression
---
```
end with with empty line.scl
```scl
// A -> B @ Click
// ->> B @ Click
```
will produce:
```console
ERROR: can't parse
---
--> examples/test.scl:3:1
|
3 |
| ^---
|
= expected expression
---
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.