mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Fix rules not being parsed entirely
This commit is contained in:
@ -266,6 +266,11 @@ def parse_whitespace(line: Line) -> None:
|
||||
line.advance()
|
||||
|
||||
|
||||
def parse_eol(line: Line) -> None:
|
||||
if line.get() is not None:
|
||||
raise RuleParseError(line, "Expected end of line")
|
||||
|
||||
|
||||
def parse_rule(line: Line) -> Rule:
|
||||
# Parse left side
|
||||
leftindex = line.index
|
||||
@ -291,6 +296,8 @@ def parse_rule(line: Line) -> Rule:
|
||||
else:
|
||||
rightpath = PurePath(right)
|
||||
|
||||
parse_eol(line)
|
||||
|
||||
# Dispatch
|
||||
if arrowname == "":
|
||||
return NormalRule(PurePath(left), rightpath)
|
||||
|
Reference in New Issue
Block a user