Repository navigation
Expand file tree
/
Copy pathCommentBlock.java
More file actions
68 lines (35 loc) · 2.55 KB
/
Copy pathCommentBlock.java
File metadata and controls
68 lines (35 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package Breccia.parser;
import java.util.List;
/** A comment block in Breccia.
*
*/ @TagName("CommentBlock") @DataReflector
public interface CommentBlock extends Granum {
// ━━━ G r a n u m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/** Returns zero: comment blocks comprise whole lines.
*/
public default @Override int column() { return 0; }
/** A list in linear order of the lines of this comment block. The listed lines cover the whole of
* the block such that *its* {@linkplain #text() flat text} comprises that of the lines, end to end.
*/
public @DataReflector List<Line> components() throws ParseError;
/** The default implementation returns ‘CommentBlock’.
*/
public default @Override String tagName() { return "CommentBlock"; }
// ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
/** A line of a comment block.
*
*/ @TagName("Line") @DataReflector
public static interface Line extends CommentaryHolder {
// ━━━ C o m m e n t a r y H o l d e r ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/** {@inheritDoc}
* Its tag name in case of a comment-block label is ‘Label’, otherwise it is ‘Commentary’.
*/
public @Override @TagName("Commentary or Label") Granum commentary();
// ━━━ G r a n u m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/** Returns zero: each line of a comment block comprises a whole line.
*/
public default @Override int column() { return 0; }
/** The default implementation returns ‘Line’.
*/
public default @Override String tagName() { return "Line"; }}}
// Copyright © 2021-2022 Michael Allan. Licence MIT.