From 7532a64621402be5633c1a0ab1118caa50b4b9d4 Mon Sep 17 00:00:00 2001 From: Jamie Willis Date: Sun, 22 Jan 2023 21:13:10 +0000 Subject: [PATCH] position module description --- parsley/shared/src/main/scala/parsley/position.scala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/parsley/shared/src/main/scala/parsley/position.scala b/parsley/shared/src/main/scala/parsley/position.scala index 75c0c768a..33c94a250 100644 --- a/parsley/shared/src/main/scala/parsley/position.scala +++ b/parsley/shared/src/main/scala/parsley/position.scala @@ -7,10 +7,14 @@ import parsley.implicits.zipped.Zipped3 import parsley.internal.deepembedding.singletons -/** TODO: Document - * These parsers provide a way to extract position information during a parse. This can be important +/** This module contains parsers that provide a way to extract position information during a parse. + * + * Position parsers can be important * for when the final result of the parser needs to encode position information for later consumption: - * this is particularly useful for abstract syntax trees. + * this is particularly useful for abstract syntax trees. Offset is also exposed by this interface, which + * may be useful for establishing a caret size in specialised error messages. + * + * @since 4.2.0 */ object position { /** This parser returns the current line number (starting at 1) of the input without having any other effect.