Comment constructor
Comment(
- String text
Implementation
Comment(this.text) {
if (text.length >= 2 && text[1] == ' ') {
switch (text[0]) {
case ':':
type = 'reference';
text = text.substring(2);
return;
case '.':
type = 'extracted';
text = text.substring(2);
return;
case ',':
type = 'flag';
text = text.substring(2);
return;
case '|':
type = 'previous';
text = text.substring(2);
return;
}
}
type = 'translator';
}