1 // Copyright (C) 2020-2025 Free Software Foundation, Inc.
3 // This file is part of GCC.
5 // GCC is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU General Public License as published by the Free
7 // Software Foundation; either version 3, or (at your option) any later
10 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 // You should have received a copy of the GNU General Public License
16 // along with GCC; see the file COPYING3. If not see
17 // <http://www.gnu.org/licenses/>.
19 #ifndef RUST_AST_FULL_DECLS_H
20 #define RUST_AST_FULL_DECLS_H
22 // Forward declarations for all AST classes. Useful for not having to include
35 class SimplePathSegment
;
39 class AttrInputMetaItemContainer
;
44 class ExprWithoutBlock
;
53 class ConstGenericParam
;
60 class PathIdentSegment
;
61 struct GenericArgsBinding
;
63 class PathExprSegment
;
65 class PathInExpression
;
66 class TypePathSegment
;
67 class TypePathSegmentGeneric
;
68 struct TypePathFunction
;
69 class TypePathSegmentFunction
;
71 struct QualifiedPathType
;
72 class QualifiedPathInExpression
;
73 class QualifiedPathInType
;
78 class AttrInputLiteral
;
80 class MetaItemLitExpr
;
81 class MetaItemPathLit
;
84 class DereferenceExpr
;
85 class ErrorPropagationExpr
;
87 class ArithmeticOrLogicalExpr
;
89 class LazyBooleanExpr
;
92 class CompoundAssignmentExpr
;
95 class ArrayElemsValues
;
96 class ArrayElemsCopied
;
100 class TupleIndexExpr
;
102 class StructExprStruct
;
104 class StructExprField
;
105 class StructExprFieldIdentifier
;
106 class StructExprFieldWithVal
;
107 class StructExprFieldIdentifierValue
;
108 class StructExprFieldIndexValue
;
109 class StructExprStructFields
;
110 class StructExprStructBase
;
112 class MethodCallExpr
;
113 class FieldAccessExpr
;
116 class ClosureExprInner
;
118 class ClosureExprInnerTyped
;
122 class RangeFromToExpr
;
126 class RangeFromToInclExpr
;
127 class RangeToInclExpr
;
129 class UnsafeBlockExpr
;
134 class WhileLetLoopExpr
;
137 class IfExprConseqElse
;
139 class IfLetExprConseqElse
;
142 // class MatchCaseBlockExpr;
143 // class MatchCaseExpr;
147 class AsyncBlockExpr
;
148 enum class InlineAsmOptions
;
150 struct InlineAsmRegOrRegClass
;
151 struct InlineAsmOperand
;
152 struct InlineAsmPlaceHolder
;
153 struct InlineAsmTemplatePiece
;
155 struct TupleTemplateStr
;
165 class WhereClauseItem
;
166 class LifetimeWhereClauseItem
;
167 class TypeBoundWhereClauseItem
;
170 class FunctionQualifiers
;
180 class UseDeclaration
;
190 class EnumItemStruct
;
191 class EnumItemDiscriminant
;
196 class TraitItemConst
;
203 class ExternalTypeItem
;
204 class ExternalStaticItem
;
205 class NamedFunctionParam
;
209 class MacroMatchFragment
;
210 class MacroMatchRepetition
;
212 struct MacroTranscriber
;
214 class MacroRulesDefinition
;
215 class MacroInvocation
;
219 class MetaNameValueStr
;
221 class MetaListNameValueStr
;
224 class LiteralPattern
;
225 class IdentifierPattern
;
226 class WildcardPattern
;
228 class RangePatternBound
;
229 class RangePatternBoundLiteral
;
230 class RangePatternBoundPath
;
231 class RangePatternBoundQualPath
;
233 class ReferencePattern
;
234 struct StructPatternEtc
;
235 class StructPatternField
;
236 class StructPatternFieldTuplePat
;
237 class StructPatternFieldIdentPat
;
238 class StructPatternFieldIdent
;
239 class StructPatternElements
;
241 class TupleStructItems
;
242 class TupleStructItemsNoRange
;
243 class TupleStructItemsRange
;
244 class TupleStructPattern
;
245 class TuplePatternItems
;
246 class TuplePatternItemsMultiple
;
247 class TuplePatternItemsRanged
;
249 class GroupedPattern
;
256 class TraitObjectType
;
257 class ParenthesisedType
;
258 class ImplTraitTypeOneBound
;
259 class TraitObjectTypeOneBound
;
262 class RawPointerType
;
267 struct MaybeNamedParam
;
268 class BareFunctionType
;
270 // rust-builtin-ast-nodes.h