MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::ast::Mods Struct Reference

Raw, unvalidated combination of priv/pub/extern/anx modifiers written before a declaration. More...

#include <mim/ast/ast.h>

Public Member Functions

Vis default_vis () const
 extern/anx nudge the default visibility to Pub unless priv is given explicitly.
Vis resolved_vis () const

Public Attributes

std::optional< Visvis = {}
bool is_extern = false
bool is_anx = false

Detailed Description

Raw, unvalidated combination of priv/pub/extern/anx modifiers written before a declaration.

Parser::parse_modifiers only rejects a modifier being repeated (priv priv, extern extern, ...); whether a given combination makes sense for the decl that follows is up to that decl's own parser.

Definition at line 55 of file ast.h.

Member Function Documentation

◆ default_vis()

Vis mim::ast::Mods::default_vis ( ) const
inline

extern/anx nudge the default visibility to Pub unless priv is given explicitly.

Definition at line 61 of file ast.h.

References is_anx, is_extern, mim::ast::Priv, and mim::ast::Pub.

Referenced by mim::ast::operator<<(), and resolved_vis().

◆ resolved_vis()

Vis mim::ast::Mods::resolved_vis ( ) const
inline

Definition at line 62 of file ast.h.

References default_vis(), and vis.

Referenced by mim::ast::operator<<().

Member Data Documentation

◆ is_anx

bool mim::ast::Mods::is_anx = false

Definition at line 58 of file ast.h.

Referenced by default_vis(), and mim::ast::operator<<().

◆ is_extern

bool mim::ast::Mods::is_extern = false

Definition at line 57 of file ast.h.

Referenced by default_vis(), and mim::ast::operator<<().

◆ vis

std::optional<Vis> mim::ast::Mods::vis = {}

Definition at line 56 of file ast.h.

Referenced by resolved_vis().


The documentation for this struct was generated from the following file: