mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Fix arrow parsing error messages
This commit is contained in:
parent
1bbc0b705f
commit
9cb2b68f09
@ -249,7 +249,7 @@ def parse_arrow(line: Line) -> str:
|
|||||||
break # End of arrow
|
break # End of arrow
|
||||||
else:
|
else:
|
||||||
name.append("-")
|
name.append("-")
|
||||||
name.append(c)
|
continue
|
||||||
else:
|
else:
|
||||||
name.append(c)
|
name.append(c)
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ def parse_rule(line: Line) -> Rule:
|
|||||||
return NameRule(ReRule(left, right))
|
return NameRule(ReRule(left, right))
|
||||||
else:
|
else:
|
||||||
line.index = arrowindex + 1 # For nicer error message
|
line.index = arrowindex + 1 # For nicer error message
|
||||||
raise RuleParseError(line, "Invalid arrow name")
|
raise RuleParseError(line, f"Invalid arrow name {arrowname!r}")
|
||||||
|
|
||||||
|
|
||||||
class Transformer:
|
class Transformer:
|
||||||
|
Loading…
Reference in New Issue
Block a user