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