File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 18
18
You can also wrap the strings in an @hl.scala{IgnoreCase("...")} if you want the matching to be case-insensitive.
19
19
20
20
@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(...)}.
28
27
29
28
@sect{Sequence}
30
29
You can’t perform that action at this time.
0 commit comments