nixd
Loading...
Searching...
No Matches
nixf::SemaAttrs Class Reference

Attribute set after deduplication. More...

#include <Attrs.h>

Public Member Functions

 SemaAttrs (Misc *Recursive)
 
 SemaAttrs (std::map< std::string, Attribute > Static, std::vector< Attribute > Dynamic, Misc *Recursive)
 
const std::map< std::string, Attribute > & staticAttrs () const
 Static attributes, do not require evaluation to get the key.
 
const std::vector< Attribute > & dynamicAttrs () const
 Dynamic attributes, require evaluation to get the key.
 
bool isRecursive () const
 If the attribute set is rec.
 

Friends

class Sema
 

Detailed Description

Attribute set after deduplication.

Represeting the attribute set suitable for variable lookups, evaluation.

The attrset cannot have duplicate keys, and keys will be desugared to strict K-V form.

e.g. { a.b.c = 1 } -> { a = { b = { c = 1; }; }; }

Definition at line 236 of file Attrs.h.

Constructor & Destructor Documentation

◆ SemaAttrs() [1/2]

nixf::SemaAttrs::SemaAttrs ( Misc * Recursive)
inline

Definition at line 248 of file Attrs.h.

◆ SemaAttrs() [2/2]

nixf::SemaAttrs::SemaAttrs ( std::map< std::string, Attribute > Static,
std::vector< Attribute > Dynamic,
Misc * Recursive )
inline

Definition at line 249 of file Attrs.h.

Member Function Documentation

◆ dynamicAttrs()

const std::vector< Attribute > & nixf::SemaAttrs::dynamicAttrs ( ) const
inlinenodiscard

Dynamic attributes, require evaluation to get the key.

e.g. { "${asdasda}" = "asdasd"; }

Definition at line 264 of file Attrs.h.

◆ isRecursive()

bool nixf::SemaAttrs::isRecursive ( ) const
inlinenodiscard

If the attribute set is rec.

Definition at line 269 of file Attrs.h.

◆ staticAttrs()

const std::map< std::string, Attribute > & nixf::SemaAttrs::staticAttrs ( ) const
inlinenodiscard

Static attributes, do not require evaluation to get the key.

e.g. { a = 1; b = 2; }

Definition at line 257 of file Attrs.h.

Friends And Related Symbol Documentation

◆ Sema

friend class Sema
friend

Definition at line 245 of file Attrs.h.

References Sema.

Referenced by Sema.


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