sun::ast::MatchArm

sun::ast::MatchArm

struct · Source (opens in a new tab)

struct sun::ast::MatchArm

A single arm in a match expression: pattern => body.

Public Functions

MatchArm

MatchArm(const MatchArm &)=delete

public · function · Source (opens in a new tab)

sun::ast::MatchArm::MatchArm(const MatchArm &)=delete

No copy.

Related: MatchArm

MatchArm(MatchArm &&other)=default

public · function · Source (opens in a new tab)

sun::ast::MatchArm::MatchArm(MatchArm &&other)=default

Move constructor.

Related: MatchArm

MatchArm(std::unique_ptr< ExprAST > pattern, bool isWildcard, std::unique_ptr< ExprAST > body)

public · function · Source (opens in a new tab)

sun::ast::MatchArm::MatchArm(std::unique_ptr< ExprAST > pattern, bool isWildcard, std::unique_ptr< ExprAST > body)

Creates a match branch owning its pattern and body.

Related: ExprAST

operator=

operator=(MatchArm &&other)=default

public · function · Source (opens in a new tab)

MatchArm & sun::ast::MatchArm::operator=(MatchArm &&other)=default

Transfers the stored state from another instance during move assignment.

Related: MatchArm

operator=(const MatchArm &)=delete

public · function · Source (opens in a new tab)

MatchArm & sun::ast::MatchArm::operator=(const MatchArm &)=delete

Disallows assignment so ownership and object identity cannot be duplicated.

Related: MatchArm

Public Fields

bindingType

public · variable · Source (opens in a new tab)

std::optional<TypeAnnotation> sun::ast::MatchArm::bindingType

No documentation comment.

Related: TypeAnnotation

bindings

public · variable · Source (opens in a new tab)

std::vector<PatternBinding> sun::ast::MatchArm::bindings

No documentation comment.

Related: PatternBinding

body

public · variable · Source (opens in a new tab)

std::unique_ptr<ExprAST> sun::ast::MatchArm::body

No documentation comment.

Related: ExprAST

hasPayloadParens

public · variable · Source (opens in a new tab)

bool sun::ast::MatchArm::hasPayloadParens = false

No documentation comment.

isWildcard

public · variable · Source (opens in a new tab)

bool sun::ast::MatchArm::isWildcard

No documentation comment.

matchedVariantTags

public · variable · Source (opens in a new tab)

std::vector<int64_t> sun::ast::MatchArm::matchedVariantTags

No documentation comment.

pattern

public · variable · Source (opens in a new tab)

std::unique_ptr<ExprAST> sun::ast::MatchArm::pattern

No documentation comment.

Related: ExprAST

resolvedVariantTag

public · variable · Source (opens in a new tab)

int64_t sun::ast::MatchArm::resolvedVariantTag = -1

No documentation comment.