-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I am trying to match anything but ; and thought I could do the following:
parser = peg Line do
Line <- str(!";")
end
Xpeg.match(parser, "a")But nothing is captured:
%{
captures: [""],
match_len: 0,
rest: 'a',
result: :ok,
time: 0.0,
userdata: nil
}
I also tried various other patterns to no avail:
parser = peg Line do
Line <- str(!{";"})
end
Xpeg.match(parser, "a")or
parser = peg Line do
Line <- str(!{';'})
end
Xpeg.match(parser, "a")In the tests I could only find a negation without capture: https://github.com/zevv/xpeg/blob/master/test/xpeg_test.exs#L85-L86. Maybe negation does not capture anything?
What am I doing wrong?
Metadata
Metadata
Assignees
Labels
No labels