Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sonologico committed Apr 24, 2021
1 parent 71bf14e commit 67cf3a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 67cf3a1

Please sign in to comment.