forked from runtimeverification/k
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLiterateModuleComment.java
More file actions
49 lines (39 loc) · 1.21 KB
/
LiterateModuleComment.java
File metadata and controls
49 lines (39 loc) · 1.21 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
// Copyright (c) 2012-2019 K Team. All Rights Reserved.
package org.kframework.kil;
public class LiterateModuleComment extends ModuleItem implements LiterateComment {
private String value;
private LiterateCommentType lcType;
public LiterateModuleComment(LiterateModuleComment literateModuleComment) {
super(literateModuleComment);
value = literateModuleComment.value;
lcType = literateModuleComment.lcType;
}
public LiterateModuleComment(String value, LiterateCommentType lcType) {
this.value = value;
this.lcType = lcType;
}
public LiterateModuleComment(LiterateDefinitionComment ldc) {
setSource(ldc.getSource());
setLocation(ldc.getLocation());
value = ldc.getValue();
lcType = ldc.getType();
}
@Override
public LiterateCommentType getType() {
return lcType;
}
public void setValue(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public LiterateModuleComment shallowCopy() {
return new LiterateModuleComment(this);
}
@Override
public String toString() {
return "/*"+lcType+value+"*/";
}
}