Skip to content

Error on Parser::parse when a file doesn't have expressions (max 3 lines) #26

@DrSensor

Description

@DrSensor

Given this file then execute scrap code $file -f xstate:

3 lines empty.scl



will produce:

ERROR: can't parse
---
 --> examples/test.scl:3:1
  |
3 | 
  | ^---
  |
  = expected expression
---
3 lines with comment.scl
// A -> B @ Click
// A <-> B @ Toggle
// ->> B @ Click

will produce:

ERROR: can't parse
---
 --> examples/test.scl:3:17
  |
3 | // ->> B @ Click
  |                 ^---
  |
  = expected expression
---
end with with comment.scl
// A -> B @ Click

// ->> B @ Click

will produce:

ERROR: can't parse
---
 --> examples/test.scl:3:17
  |
3 | // ->> B @ Click
  |                 ^---
  |
  = expected expression
---
end with with empty line.scl
// A -> B @ Click
// ->> B @ Click

will produce:

ERROR: can't parse
---
 --> examples/test.scl:3:1
  |
3 | 
  | ^---
  |
  = expected expression
---

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions