From 67cf3a18d3988c27d2b91a2fc5e4cfcc2b865025 Mon Sep 17 00:00:00 2001 From: Raphael Sousa Santos Date: Sat, 24 Apr 2021 19:04:18 +0200 Subject: [PATCH] Add comment --- src/ast.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ast.ml b/src/ast.ml index 5d21ecd2..3db32f82 100644 --- a/src/ast.ml +++ b/src/ast.ml @@ -28,6 +28,10 @@ module MakeBlock(I : T) = struct defs: 'attr I.t list; } + (* The 'attr parameter is present in all variants in this type. We use it to associate + extra information to each node in the AST. In the common case, the attributes type defined + above is used. We might eventually have an alternative function parse blocks while keeping + concrete information such as source location and we'll use it for that as well. *) type 'attr block = | Paragraph of 'attr * 'attr I.t | List of 'attr * list_type * list_spacing * 'attr block list list @@ -46,6 +50,7 @@ type 'attr link = title: string option; } +(* See comment on the block type about the 'attr parameter *) and 'attr inline = | Concat of 'attr * 'attr inline list | Text of 'attr * string