Skip to content
← Back

src/syntax/trees/definitions/pragma.ghul

1
namespace Syntax.Trees.Definitions is
2
use Source;
3
4
class PRAGMA(
5
location: LOCATION,
6
pragma: Pragmas.PRAGMA,
7
definition: Definition public
8
): Definition is
9
without_pragmas: Definition => definition.without_pragmas;
10
11
super(location);
12
13
is_name_equal_to(name: string) -> bool => pragma.is_name_equal_to(name);
14
15
try_get_string_literal_at(index: int) -> string? => pragma.try_get_string_literal_at(index);
16
17
accept(visitor: Visitor) is
18
visitor.visit(self);
19
si
20
21
walk(visitor: Visitor) is
22
if !visitor.pre(self) then
23
pragma.walk(visitor);
24
definition.walk(visitor);
25
fi
26
27
accept(visitor);
28
si
29
si
30
si