forked from runtimeverification/k
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStringSentence.java
More file actions
70 lines (57 loc) · 1.55 KB
/
StringSentence.java
File metadata and controls
70 lines (57 loc) · 1.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
69
70
// Copyright (c) 2012-2019 K Team. All Rights Reserved.
package org.kframework.kil;
/**
* Used as a container for unparsed sentences like rule, context and configuration.
*
* @author Radu
*
*/
public class StringSentence extends ModuleItem {
private String content;
private int contentStartLine;
private int contentStartColumn;
private String label;
private String type;
public StringSentence(String content, int contentStartLine, int contentStartColumn, String type, String label) {
this.content = content;
this.contentStartLine = contentStartLine;
this.contentStartColumn = contentStartColumn;
this.type = type;
this.label = label;
}
public StringSentence(StringSentence node) {
super(node);
this.content = node.content;
}
public String toString() {
return type+"["+label+"]:"+content;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public StringSentence shallowCopy() {
return new StringSentence(this);
}
public void setType(String type) {
this.type = type;
}
public String getType() {
return type;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public int getContentStartLine() {
return contentStartLine;
}
public int getContentStartColumn() {
return contentStartColumn;
}
}