File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,9 @@ public:
81
81
// / ${line}
82
82
% end
83
83
% if child.is_optional :
84
- llvm::Optional<${child.type_name }> get${child.name }();
84
+ llvm::Optional<${child.type_name }> get${child.name }() const ;
85
85
% else :
86
- ${child.type_name } get${child.name }();
86
+ ${child.type_name } get${child.name }() const ;
87
87
% end
88
88
89
89
% child_node = NODE_MAP.get (child.syntax_kind )
Original file line number Diff line number Diff line change @@ -55,14 +55,14 @@ void ${node.name}::validate() const {
55
55
56
56
% for child in node.children:
57
57
% if child.is_optional:
58
- llvm::Optional<${child.type_name }> ${node.name }::get${child.name }() {
58
+ llvm::Optional<${child.type_name }> ${node.name }::get${child.name }() const {
59
59
auto ChildData = Data->getChild (Cursor::${child.name });
60
60
if (!ChildData)
61
61
return llvm::None;
62
62
return ${child.type_name } {Root, ChildData.get ()};
63
63
}
64
64
% else :
65
- ${child.type_name } ${node.name }::get${child.name }() {
65
+ ${child.type_name } ${node.name }::get${child.name }() const {
66
66
return ${child.type_name } {Root, Data->getChild (Cursor::${child.name }).get ()};
67
67
}
68
68
% end
You can’t perform that action at this time.
0 commit comments