summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTristano Ajmone <tajmone@libero.it>2019-06-05 16:20:13 +0200
committerMiran <narimiran@disroot.org>2019-06-05 16:20:13 +0200
commit6ebbff0a111b284625dced137973a660087befb1 (patch)
treecb2e9013e989739d54e6818e4328d9f1c8b33b8b
parentc16a75382208ebfa03ee847c81efa15b18fa0ca4 (diff)
downloadNim-6ebbff0a111b284625dced137973a660087befb1.tar.gz
Fix strscans Docs (#11408) [ci skip]
Amend two typos in the documentation of strscans library:

- `a ^* b` instead of `a ^+ b`.
- Remove hyphen from `$w` ASCII identifier `[A-Z-a-z_][A-Za-z_0-9]*`
  (matching `IdentStartChars` definition in parseutils).
-rw-r--r--lib/pure/strscans.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/strscans.nim b/lib/pure/strscans.nim
index c1c535e55..fd6f3a87d 100644
--- a/lib/pure/strscans.nim
+++ b/lib/pure/strscans.nim
@@ -36,7 +36,7 @@ substrings starting with ``$``. These constructions are available:
 ``$i``              Matches a decimal integer. This uses ``parseutils.parseInt``.
 ``$h``              Matches a hex integer. This uses ``parseutils.parseHex``.
 ``$f``              Matches a floating pointer number. Uses ``parseFloat``.
-``$w``              Matches an ASCII identifier: ``[A-Z-a-z_][A-Za-z_0-9]*``.
+``$w``              Matches an ASCII identifier: ``[A-Za-z_][A-Za-z_0-9]*``.
 ``$s``              Skips optional whitespace.
 ``$$``              Matches a single dollar sign.
 ``$.``              Matches if the end of the input string has been reached.
@@ -131,7 +131,7 @@ to use prefix instead of postfix operators.
 ``E{n,m}``       From ``n`` up to ``m`` times ``E``
 ``~E``           Not predicate
 ``a ^* b``       Shortcut for ``?(a *(b a))``. Usually used for separators.
-``a ^* b``       Shortcut for ``?(a +(b a))``. Usually used for separators.
+``a ^+ b``       Shortcut for ``?(a +(b a))``. Usually used for separators.
 ``'a'``          Matches a single character
 ``{'a'..'b'}``   Matches a character set
 ``"s"``          Matches a string