nixd
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
nixf::Formals Class Reference

Lambda formal arguments. More...

#include <Lambda.h>

Inheritance diagram for nixf::Formals:
[legend]
Collaboration diagram for nixf::Formals:
[legend]

Public Types

using FormalVector = std::vector<std::shared_ptr<Formal>>
 
- Public Types inherited from nixf::Node
enum  NodeKind { NK_BeginExpr , NK_EndExpr }
 
using ChildVector = boost::container::small_vector<Node *, 8>
 

Public Member Functions

 Formals (LexerCursorRange Range, FormalVector Members, std::map< std::string, const Formal * > Dedup)
 
const FormalVectormembers () const
 
const std::map< std::string, const Formal * > & dedup ()
 Deduplicated formals.
 
const std::map< std::string, const Formal * > & dedup () const
 
ChildVector children () const override
 
- Public Member Functions inherited from nixf::Node
NodeKind kind () const
 
LexerCursorRange range () const
 
PositionRange positionRange () const
 
LexerCursor lCur () const
 
LexerCursor rCur () const
 
const char * name () const
 
virtual ~Node ()=default
 
const Nodedescend (PositionRange Range) const
 Descendant node that contains the given range.
 
std::string_view src (std::string_view Src) const
 

Additional Inherited Members

- Static Public Member Functions inherited from nixf::Node
static const char * name (NodeKind Kind)
 
- Protected Member Functions inherited from nixf::Node
 Node (NodeKind Kind, LexerCursorRange Range)
 

Detailed Description

Lambda formal arguments.

Things to check:

  1. Ellipsis can only occur at the end of the formals. { ..., pkgs } -> { pkgs, ... }
  2. Ellipsis can only occur once. { b, ..., a, ... } -> { a, ... }

Definition at line 58 of file Lambda.h.

Member Typedef Documentation

◆ FormalVector

using nixf::Formals::FormalVector = std::vector<std::shared_ptr<Formal>>

Definition at line 65 of file Lambda.h.

Constructor & Destructor Documentation

◆ Formals()

nixf::Formals::Formals ( LexerCursorRange Range,
FormalVector Members,
std::map< std::string, const Formal * > Dedup )
inline

Definition at line 66 of file Lambda.h.

Member Function Documentation

◆ children()

ChildVector nixf::Formals::children ( ) const
inlineoverridevirtual

Implements nixf::Node.

Definition at line 80 of file Lambda.h.

◆ dedup() [1/2]

const std::map< std::string, const Formal * > & nixf::Formals::dedup ( )
inline

Deduplicated formals.

Definition at line 74 of file Lambda.h.

◆ dedup() [2/2]

const std::map< std::string, const Formal * > & nixf::Formals::dedup ( ) const
inline

Definition at line 76 of file Lambda.h.

◆ members()

const FormalVector & nixf::Formals::members ( ) const
inline

Definition at line 71 of file Lambda.h.


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