Skip to content

Commit ade31e9

Browse files
committed
Add @canonical tag
1 parent aa0fd2a commit ade31e9

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

src/octLexer.mll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ let _ =
638638
("see", fun lexbuf -> See (see lexbuf));
639639
("since", fun lexbuf -> Since (version lexbuf));
640640
("before", fun lexbuf -> Before (version lexbuf));
641-
("version", fun lexbuf -> Version (version lexbuf)); ]
641+
("version", fun lexbuf -> Version (version lexbuf));
642+
("canonical", fun lexbuf -> Canonical (identifier lexbuf)); ]
642643

643644
}

src/octParser.mly

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ let html_close_to_string t = "</" ^ t ^ ">"
138138
%token RETURN
139139
%token INLINE
140140
%token <string> Custom
141+
%token <string> Canonical
141142

142143
%token BEGIN
143144
%token END
@@ -213,6 +214,7 @@ tags:
213214
simple_tag:
214215
| Version { Version $1 }
215216
| Since { Since $1 }
217+
| Canonical { Canonical $1 }
216218
;
217219

218220
text_tag:

src/octPrint.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ let tag i ppf x =
169169
| Custom(s, txt) ->
170170
line i ppf "Custom %s\n" s;
171171
text i ppf txt
172+
| Canonical s ->
173+
line i ppf "Canonical %s" s
172174

173175
let documentation i ppf (txt, tags) =
174176
line i ppf "Cinfo\n";

src/octTypes.mli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ type tag =
9090
| Return_value of text (** \@return tag *)
9191
| Inline (** \@inline tag *)
9292
| Custom of string * text (** custom tag *)
93+
| Canonical of string (** \@canonical tag *)
9394

9495
(** A special comment *)
9596
type t = text * tag list

0 commit comments

Comments
 (0)