Skip to content

Commit 4a40500

Browse files
franktominclihaoyi
authored andcommitted
Fix getting started to reflect the correct usage (#211)
Change val to def
1 parent 5f26466 commit 4a40500

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme/WritingParsers.scalatex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
@p
2323
The @code{P(...)} lets you write mutually recursive parsers, without
2424
running into circular initialization problems, and gives the parser a
25-
nice, human-readable name (from the @hl.scala{val}
25+
nice, human-readable name (from the @hl.scala{def}
2626
it is being assigned to) which appears in parse error messages.
2727
In general, every time you assign a parser
28-
to a @hl.scala{val}, you should wrap it in @code{P(...)}.
28+
to a @hl.scala{def}, you should wrap it in @code{P(...)}.
2929

3030
@sect{Failures}
3131
@hl.ref(tests/"ExampleTests.scala", Seq("'failures", ""))

0 commit comments

Comments
 (0)