Lines Matching refs:syntax

18 class clang::syntax::FactoryImpl {
20 static void setCanModify(syntax::Node *N) { N->CanModify = true; } in setCanModify()
22 static void prependChildLowLevel(syntax::Tree *T, syntax::Node *Child, in prependChildLowLevel()
23 syntax::NodeRole R) { in prependChildLowLevel()
26 static void appendChildLowLevel(syntax::Tree *T, syntax::Node *Child, in appendChildLowLevel()
27 syntax::NodeRole R) { in appendChildLowLevel()
40 syntax::Leaf *clang::syntax::createLeaf(syntax::Arena &A, in createLeaf()
50 auto *Leaf = new (A.getAllocator()) syntax::Leaf( in createLeaf()
52 syntax::FactoryImpl::setCanModify(Leaf); in createLeaf()
57 syntax::Leaf *clang::syntax::createLeaf(syntax::Arena &A, in createLeaf()
70 syntax::Tree *allocateTree(syntax::Arena &A, syntax::NodeKind Kind) { in allocateTree()
72 case syntax::NodeKind::Leaf: in allocateTree()
75 case syntax::NodeKind::TranslationUnit: in allocateTree()
76 return new (A.getAllocator()) syntax::TranslationUnit; in allocateTree()
77 case syntax::NodeKind::UnknownExpression: in allocateTree()
78 return new (A.getAllocator()) syntax::UnknownExpression; in allocateTree()
79 case syntax::NodeKind::ParenExpression: in allocateTree()
80 return new (A.getAllocator()) syntax::ParenExpression; in allocateTree()
81 case syntax::NodeKind::ThisExpression: in allocateTree()
82 return new (A.getAllocator()) syntax::ThisExpression; in allocateTree()
83 case syntax::NodeKind::IntegerLiteralExpression: in allocateTree()
84 return new (A.getAllocator()) syntax::IntegerLiteralExpression; in allocateTree()
85 case syntax::NodeKind::CharacterLiteralExpression: in allocateTree()
86 return new (A.getAllocator()) syntax::CharacterLiteralExpression; in allocateTree()
87 case syntax::NodeKind::FloatingLiteralExpression: in allocateTree()
88 return new (A.getAllocator()) syntax::FloatingLiteralExpression; in allocateTree()
89 case syntax::NodeKind::StringLiteralExpression: in allocateTree()
90 return new (A.getAllocator()) syntax::StringLiteralExpression; in allocateTree()
91 case syntax::NodeKind::BoolLiteralExpression: in allocateTree()
92 return new (A.getAllocator()) syntax::BoolLiteralExpression; in allocateTree()
93 case syntax::NodeKind::CxxNullPtrExpression: in allocateTree()
94 return new (A.getAllocator()) syntax::CxxNullPtrExpression; in allocateTree()
95 case syntax::NodeKind::IntegerUserDefinedLiteralExpression: in allocateTree()
96 return new (A.getAllocator()) syntax::IntegerUserDefinedLiteralExpression; in allocateTree()
97 case syntax::NodeKind::FloatUserDefinedLiteralExpression: in allocateTree()
98 return new (A.getAllocator()) syntax::FloatUserDefinedLiteralExpression; in allocateTree()
99 case syntax::NodeKind::CharUserDefinedLiteralExpression: in allocateTree()
100 return new (A.getAllocator()) syntax::CharUserDefinedLiteralExpression; in allocateTree()
101 case syntax::NodeKind::StringUserDefinedLiteralExpression: in allocateTree()
102 return new (A.getAllocator()) syntax::StringUserDefinedLiteralExpression; in allocateTree()
103 case syntax::NodeKind::PrefixUnaryOperatorExpression: in allocateTree()
104 return new (A.getAllocator()) syntax::PrefixUnaryOperatorExpression; in allocateTree()
105 case syntax::NodeKind::PostfixUnaryOperatorExpression: in allocateTree()
106 return new (A.getAllocator()) syntax::PostfixUnaryOperatorExpression; in allocateTree()
107 case syntax::NodeKind::BinaryOperatorExpression: in allocateTree()
108 return new (A.getAllocator()) syntax::BinaryOperatorExpression; in allocateTree()
109 case syntax::NodeKind::UnqualifiedId: in allocateTree()
110 return new (A.getAllocator()) syntax::UnqualifiedId; in allocateTree()
111 case syntax::NodeKind::IdExpression: in allocateTree()
112 return new (A.getAllocator()) syntax::IdExpression; in allocateTree()
113 case syntax::NodeKind::CallExpression: in allocateTree()
114 return new (A.getAllocator()) syntax::CallExpression; in allocateTree()
115 case syntax::NodeKind::UnknownStatement: in allocateTree()
116 return new (A.getAllocator()) syntax::UnknownStatement; in allocateTree()
117 case syntax::NodeKind::DeclarationStatement: in allocateTree()
118 return new (A.getAllocator()) syntax::DeclarationStatement; in allocateTree()
119 case syntax::NodeKind::EmptyStatement: in allocateTree()
120 return new (A.getAllocator()) syntax::EmptyStatement; in allocateTree()
121 case syntax::NodeKind::SwitchStatement: in allocateTree()
122 return new (A.getAllocator()) syntax::SwitchStatement; in allocateTree()
123 case syntax::NodeKind::CaseStatement: in allocateTree()
124 return new (A.getAllocator()) syntax::CaseStatement; in allocateTree()
125 case syntax::NodeKind::DefaultStatement: in allocateTree()
126 return new (A.getAllocator()) syntax::DefaultStatement; in allocateTree()
127 case syntax::NodeKind::IfStatement: in allocateTree()
128 return new (A.getAllocator()) syntax::IfStatement; in allocateTree()
129 case syntax::NodeKind::ForStatement: in allocateTree()
130 return new (A.getAllocator()) syntax::ForStatement; in allocateTree()
131 case syntax::NodeKind::WhileStatement: in allocateTree()
132 return new (A.getAllocator()) syntax::WhileStatement; in allocateTree()
133 case syntax::NodeKind::ContinueStatement: in allocateTree()
134 return new (A.getAllocator()) syntax::ContinueStatement; in allocateTree()
135 case syntax::NodeKind::BreakStatement: in allocateTree()
136 return new (A.getAllocator()) syntax::BreakStatement; in allocateTree()
137 case syntax::NodeKind::ReturnStatement: in allocateTree()
138 return new (A.getAllocator()) syntax::ReturnStatement; in allocateTree()
139 case syntax::NodeKind::RangeBasedForStatement: in allocateTree()
140 return new (A.getAllocator()) syntax::RangeBasedForStatement; in allocateTree()
141 case syntax::NodeKind::ExpressionStatement: in allocateTree()
142 return new (A.getAllocator()) syntax::ExpressionStatement; in allocateTree()
143 case syntax::NodeKind::CompoundStatement: in allocateTree()
144 return new (A.getAllocator()) syntax::CompoundStatement; in allocateTree()
145 case syntax::NodeKind::UnknownDeclaration: in allocateTree()
146 return new (A.getAllocator()) syntax::UnknownDeclaration; in allocateTree()
147 case syntax::NodeKind::EmptyDeclaration: in allocateTree()
148 return new (A.getAllocator()) syntax::EmptyDeclaration; in allocateTree()
149 case syntax::NodeKind::StaticAssertDeclaration: in allocateTree()
150 return new (A.getAllocator()) syntax::StaticAssertDeclaration; in allocateTree()
151 case syntax::NodeKind::LinkageSpecificationDeclaration: in allocateTree()
152 return new (A.getAllocator()) syntax::LinkageSpecificationDeclaration; in allocateTree()
153 case syntax::NodeKind::SimpleDeclaration: in allocateTree()
154 return new (A.getAllocator()) syntax::SimpleDeclaration; in allocateTree()
155 case syntax::NodeKind::TemplateDeclaration: in allocateTree()
156 return new (A.getAllocator()) syntax::TemplateDeclaration; in allocateTree()
157 case syntax::NodeKind::ExplicitTemplateInstantiation: in allocateTree()
158 return new (A.getAllocator()) syntax::ExplicitTemplateInstantiation; in allocateTree()
159 case syntax::NodeKind::NamespaceDefinition: in allocateTree()
160 return new (A.getAllocator()) syntax::NamespaceDefinition; in allocateTree()
161 case syntax::NodeKind::NamespaceAliasDefinition: in allocateTree()
162 return new (A.getAllocator()) syntax::NamespaceAliasDefinition; in allocateTree()
163 case syntax::NodeKind::UsingNamespaceDirective: in allocateTree()
164 return new (A.getAllocator()) syntax::UsingNamespaceDirective; in allocateTree()
165 case syntax::NodeKind::UsingDeclaration: in allocateTree()
166 return new (A.getAllocator()) syntax::UsingDeclaration; in allocateTree()
167 case syntax::NodeKind::TypeAliasDeclaration: in allocateTree()
168 return new (A.getAllocator()) syntax::TypeAliasDeclaration; in allocateTree()
169 case syntax::NodeKind::SimpleDeclarator: in allocateTree()
170 return new (A.getAllocator()) syntax::SimpleDeclarator; in allocateTree()
171 case syntax::NodeKind::ParenDeclarator: in allocateTree()
172 return new (A.getAllocator()) syntax::ParenDeclarator; in allocateTree()
173 case syntax::NodeKind::ArraySubscript: in allocateTree()
174 return new (A.getAllocator()) syntax::ArraySubscript; in allocateTree()
175 case syntax::NodeKind::TrailingReturnType: in allocateTree()
176 return new (A.getAllocator()) syntax::TrailingReturnType; in allocateTree()
177 case syntax::NodeKind::ParametersAndQualifiers: in allocateTree()
178 return new (A.getAllocator()) syntax::ParametersAndQualifiers; in allocateTree()
179 case syntax::NodeKind::MemberPointer: in allocateTree()
180 return new (A.getAllocator()) syntax::MemberPointer; in allocateTree()
181 case syntax::NodeKind::GlobalNameSpecifier: in allocateTree()
182 return new (A.getAllocator()) syntax::GlobalNameSpecifier; in allocateTree()
183 case syntax::NodeKind::DecltypeNameSpecifier: in allocateTree()
184 return new (A.getAllocator()) syntax::DecltypeNameSpecifier; in allocateTree()
185 case syntax::NodeKind::IdentifierNameSpecifier: in allocateTree()
186 return new (A.getAllocator()) syntax::IdentifierNameSpecifier; in allocateTree()
187 case syntax::NodeKind::SimpleTemplateNameSpecifier: in allocateTree()
188 return new (A.getAllocator()) syntax::SimpleTemplateNameSpecifier; in allocateTree()
189 case syntax::NodeKind::NestedNameSpecifier: in allocateTree()
190 return new (A.getAllocator()) syntax::NestedNameSpecifier; in allocateTree()
191 case syntax::NodeKind::MemberExpression: in allocateTree()
192 return new (A.getAllocator()) syntax::MemberExpression; in allocateTree()
193 case syntax::NodeKind::CallArguments: in allocateTree()
194 return new (A.getAllocator()) syntax::CallArguments; in allocateTree()
195 case syntax::NodeKind::ParameterDeclarationList: in allocateTree()
196 return new (A.getAllocator()) syntax::ParameterDeclarationList; in allocateTree()
197 case syntax::NodeKind::DeclaratorList: in allocateTree()
198 return new (A.getAllocator()) syntax::DeclaratorList; in allocateTree()
204 syntax::Tree *clang::syntax::createTree( in createTree()
205 syntax::Arena &A, in createTree()
206 ArrayRef<std::pair<syntax::Node *, syntax::NodeRole>> Children, in createTree()
207 syntax::NodeKind K) { in createTree()
217 syntax::Node *clang::syntax::deepCopyExpandingMacros(syntax::Arena &A, in deepCopyExpandingMacros()
219 const syntax::Node *N) { in deepCopyExpandingMacros()
220 if (const auto *L = dyn_cast<syntax::Leaf>(N)) in deepCopyExpandingMacros()
226 const auto *T = cast<syntax::Tree>(N); in deepCopyExpandingMacros()
227 std::vector<std::pair<syntax::Node *, syntax::NodeRole>> Children; in deepCopyExpandingMacros()
235 syntax::EmptyStatement *clang::syntax::createEmptyStatement(syntax::Arena &A, TokenBufferTokenMana… in createEmptyStatement()