Skip to content

Commit

Permalink
remove stray curly, tweak readme txt
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed May 14, 2017
1 parent 97d9504 commit dcb44cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion readme/Changelog.scalatex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
within a certain set.

@li
Added @code{CharIn.raw}, @code{CharsWhile.raw}, @code{CharPred.raw}
Added @code{CharsWhile.raw}, @code{CharPred.raw}
intrinsics, which are identical to the non-@code{raw} versions except
these do not pre-compute a lookup table for use during parsing. This
could be useful if you find your parsers are taking too long to
Expand Down
13 changes: 6 additions & 7 deletions readme/WritingParsers.scalatex
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
You can also wrap the strings in an @hl.scala{IgnoreCase("...")} if you want the matching to be case-insensitive.

@p
The @code{P(...)} lets you write mutually recursive parsers;
without it you run into circular initialization problems and
@code{NullPointerException}s. It also provides that parser with a
nice, human-readable name that is derived from the @hl.scala{{val}
it is being assigned to. In general, every time you assign a parser
to a @hl.scala{val}, you should wrap it in @code{P(...)} to allow
for recursion and assist your future debugging.
The @code{P(...)} lets you write mutually recursive parsers, without
running into circular initialization problems, and gives the parser a
nice, human-readable name (from the @hl.scala{val}
it is being assigned to) which appears in parse error messages.
In general, every time you assign a parser
to a @hl.scala{val}, you should wrap it in @code{P(...)}.

@sect{Sequence}

Expand Down

0 comments on commit dcb44cc

Please sign in to comment.