Skip to content
This repository was archived by the owner on Jan 21, 2019. It is now read-only.
This repository was archived by the owner on Jan 21, 2019. It is now read-only.

Enhancement: Allow parsing one rule to fail cleanly #19

@Northern-Lights

Description

@Northern-Lights

When using func (p *Parser) Parse(text string), a rule that does not match the grammar exits the program with status 1. This is an example:

{"lexical":"error","line":"4","msg":"Line 4: illegal regex modifier ())"}exit status 1

It would be great if the method had this signature instead:

func (p *Parser) Parse(text string) error

If we could pass errors from the lexer up to this method, maybe we can ignore rules that do not compile without exiting the application.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions