From d5aed7754284512275ed1c06e8aef1ce924a8baf Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sun, 14 May 2017 11:37:06 +0800 Subject: [PATCH] remove stray curly, tweak readme txt --- readme/WritingParsers.scalatex | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/readme/WritingParsers.scalatex b/readme/WritingParsers.scalatex index 4dc05f74..0161fd41 100644 --- a/readme/WritingParsers.scalatex +++ b/readme/WritingParsers.scalatex @@ -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}