File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1818 You can also wrap the strings in an @hl.scala{IgnoreCase("...")} if you want the matching to be case-insensitive.
1919
2020 @p
21- The @code{P(...)} lets you write mutually recursive parsers;
22- without it you run into circular initialization problems and
23- @code{NullPointerException}s. It also provides that parser with a
24- nice, human-readable name that is derived from the @hl.scala{{val}
25- it is being assigned to. In general, every time you assign a parser
26- to a @hl.scala{val}, you should wrap it in @code{P(...)} to allow
27- for recursion and assist your future debugging.
21+ The @code{P(...)} lets you write mutually recursive parsers, without
22+ running into circular initialization problems, and gives the parser a
23+ nice, human-readable name (from the @hl.scala{val}
24+ it is being assigned to) which appears in parse error messages.
25+ In general, every time you assign a parser
26+ to a @hl.scala{val}, you should wrap it in @code{P(...)}.
2827
2928 @sect{Sequence}
3029
You can’t perform that action at this time.
0 commit comments