1 /**
2 Copyright: Copyright (c) 2016, Joakim Brännström. All rights reserved.
3 License: MPL-2
4 Author: Joakim Brännström (joakim.brannstrom@gmx.com)
5 
6 This Source Code Form is subject to the terms of the Mozilla Public License,
7 v.2.0. If a copy of the MPL was not distributed with this file, You can obtain
8 one at http://mozilla.org/MPL/2.0/.
9 
10 DO NOT EDIT. THIS FILE IS GENERATED.
11 See the generator script source/devtool/generator_clang_ast_nodes.d
12 */
13 module libclang_ast.ast.preprocessor;
14 import libclang_ast.ast.node : Node;
15 
16 abstract class Preprocessor : Node {
17     import clang.Cursor : Cursor;
18     import libclang_ast.ast : Visitor;
19 
20     private Cursor cursor_;
21 
22     // trusted on the assumption that the node is scope allocated and all access to cursor is via a scoped ref.
23     this(scope Cursor cursor) @trusted {
24         this.cursor_ = cursor;
25     }
26 
27     Cursor cursor() return const @safe {
28         return Cursor(cursor_.cx);
29     }
30 
31     override void accept(scope Visitor v) @safe const scope {
32         static import libclang_ast.ast;
33 
34         libclang_ast.ast.accept(cursor_, v);
35     }
36 }
37 
38 final class PreprocessingDirective : Preprocessor {
39     import clang.Cursor : Cursor;
40 
41     this(scope Cursor cursor) @safe {
42         super(cursor);
43     }
44 
45     override void accept(scope Visitor v) @safe const scope {
46         static import libclang_ast.ast;
47 
48         libclang_ast.ast.accept(cursor, v);
49     }
50 }
51 
52 final class MacroDefinition : Preprocessor {
53     import clang.Cursor : Cursor;
54 
55     this(scope Cursor cursor) @safe {
56         super(cursor);
57     }
58 
59     override void accept(scope Visitor v) @safe const scope {
60         static import libclang_ast.ast;
61 
62         libclang_ast.ast.accept(cursor, v);
63     }
64 }
65 
66 final class MacroExpansion : Preprocessor {
67     import clang.Cursor : Cursor;
68 
69     this(scope Cursor cursor) @safe {
70         super(cursor);
71     }
72 
73     override void accept(scope Visitor v) @safe const scope {
74         static import libclang_ast.ast;
75 
76         libclang_ast.ast.accept(cursor, v);
77     }
78 }
79 
80 final class InclusionDirective : Preprocessor {
81     import clang.Cursor : Cursor;
82 
83     this(scope Cursor cursor) @safe {
84         super(cursor);
85     }
86 
87     override void accept(scope Visitor v) @safe const scope {
88         static import libclang_ast.ast;
89 
90         libclang_ast.ast.accept(cursor, v);
91     }
92 }