Skip to content
← Back

src/syntax/trees/expressions/literals/string.ghul

1
namespace Syntax.Trees.Expressions.Literals is
2
use IO.Std;
3
use Source;
4
5
class STRING: Literal is
6
init(location: LOCATION, value_string: string) is
7
super.init(location, value_string);
8
si
9
10
accept(visitor: Visitor) is
11
visitor.visit(self);
12
si
13
14
try_get_string_literal() -> string? =>
15
if value_string.length > 0 then
16
value_string
17
else
18
null
19
fi;
20
si
21
si