Changes in src/AST/Expr.hpp [ecf3812:b6f2e7ab]
- File:
-
- 1 edited
-
src/AST/Expr.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
recf3812 rb6f2e7ab 330 330 enum GeneratedFlag { ExplicitCast, GeneratedCast }; 331 331 332 /// Even within the basic cast expression there are variants:333 /// CCast - C-Style Cast: A backwards compatable cast from C.334 /// CoerceCast - Coercion Cast: Change the type without changing the value.335 /// ReturnCast - Ascription Cast: Requires the given expression result type.336 enum CastKind { CCast, CoerceCast, ReturnCast };337 338 332 /// A type cast, e.g. `(int)e` 339 333 class CastExpr final : public Expr { … … 342 336 GeneratedFlag isGenerated; 343 337 344 CastKind kind = CCast; 338 enum CastKind { 339 Default, // C 340 Coerce, // reinterpret cast 341 Return // overload selection 342 }; 343 344 CastKind kind = Default; 345 345 346 346 CastExpr( const CodeLocation & loc, const Expr * a, const Type * to, 347 GeneratedFlag g = GeneratedCast, CastKind kind = CCast ) : Expr( loc, to ), arg( a ), isGenerated( g ), kind( kind ) {}347 GeneratedFlag g = GeneratedCast, CastKind kind = Default ) : Expr( loc, to ), arg( a ), isGenerated( g ), kind( kind ) {} 348 348 /// Cast-to-void 349 CastExpr( const CodeLocation & loc, const Expr * a, GeneratedFlag g = GeneratedCast, CastKind kind = CCast );349 CastExpr( const CodeLocation & loc, const Expr * a, GeneratedFlag g = GeneratedCast, CastKind kind = Default ); 350 350 351 351 /// Wrap a cast expression around an existing expression (always generated)
Note:
See TracChangeset
for help on using the changeset viewer.