MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::ast Namespace Reference

Classes

struct  AnnexInfo
 
struct  AnnexInfo.id
 
struct  AnnexInfo.sym
 
class  AppExpr
 callee arg More...
 
class  ArrOrPackExpr
 «dbg: shape; body» or ‹dbg: shape; body› More...
 
class  ArrowExpr
 dom -> codom More...
 
class  AST
 
class  AxiomDecl
 axm ptrn: type = value; More...
 
class  CDecl
 cfun dbg dom -> codom More...
 
class  Decl
 
class  DeclExpr
 decls e or e where decls if where is true. More...
 
class  DummyDecl
 
class  Emitter
 
class  ErrorExpr
 
class  ErrorPtrn
 
class  Expr
 
class  ExtractExpr
 tuple#index More...
 
class  GrpPtrn
 dbg_0 ... dbg_n-2 id where id = dbg_n-1: type More...
 
class  IdExpr
 sym More...
 
class  IdPtrn
 dbg: type More...
 
class  Import
 
class  InferExpr
 
class  InsertExpr
 ins(tuple, index, value) More...
 
class  LamDecl
 One of: More...
 
class  LamExpr
 Wraps a LamDecl as Expr. More...
 
class  LetDecl
 let ptrn: type = value; More...
 
class  Lexer
 
class  LitExpr
 tok:type More...
 
class  Module
 
class  Node
 
class  Parser
 Parses Mim code as AST. More...
 
class  PiExpr
 One of: More...
 
class  PrimaryExpr
 tag More...
 
class  Ptrn
 
struct  R
 
class  RecDecl
 .rec dbg: type = body More...
 
class  RetExpr
 ret ptrn = callee $ arg; body More...
 
struct  S
 
class  Scopes
 
class  SigmaExpr
 Just wraps TuplePtrn as Expr. More...
 
class  Tok
 
class  TupleExpr
 (elem_0, ..., elem_n-1) More...
 
class  TuplePtrn
 dbg::(ptrn_0, ..., ptrn_n-1) or dbg::[ptrn_0, ..., ptrn_n-1] More...
 
class  TypeExpr
 Type level More...
 
class  ValDecl
 

Typedefs

template<class T >
using Ptr = fe::Arena::Ptr<const T>
 
template<class T >
using Ptrs = std::deque<Ptr<T>>
 
using Dbgs = std::deque<Dbg>
 
using ArrExpr = ArrOrPackExpr<true>
 
using PackExpr = ArrOrPackExpr<false>
 
using Tag = Tok::Tag
 

Functions

AST load_plugins (World &, View< Sym >)
 
AST load_plugins (World &w, View< std::string > plugins)
 
AST load_plugins (World &w, Sym sym)
 
AST load_plugins (World &w, const std::string &plugin)
 
std::ostream operator
std::ostream & operator<< (std::ostream &os, Tok tok)
 

Variables

constexpr size_t Look_Ahead = 2
 
constexpr auto Num_Keys = size_t(0) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1)
 

Precedence

enum class  Prec {
  Err ,
  Bot ,
  Where ,
  Arrow ,
  Pi ,
  App ,
  Extract ,
  Lit
}
 
constexpr bool is_rassoc (Prec p)
 

Class Documentation

◆ mim::ast::AnnexInfo.id

struct mim::ast::AnnexInfo.id

Definition at line 37 of file ast.h.

Class Members
uint8_t curry
plugin_t plugin
tag_t tag
uint8_t trip

◆ mim::ast::AnnexInfo.sym

struct mim::ast::AnnexInfo.sym

Definition at line 34 of file ast.h.

Class Members
Sym plugin
Sym tag

Typedef Documentation

◆ ArrExpr

Definition at line 636 of file ast.h.

◆ Dbgs

using mim::ast::Dbgs = std::deque<Dbg>

Definition at line 23 of file ast.h.

◆ PackExpr

Definition at line 637 of file ast.h.

◆ Ptr

template<class T >
using mim::ast::Ptr = fe::Arena::Ptr<const T>

Definition at line 21 of file ast.h.

◆ Ptrs

template<class T >
using mim::ast::Ptrs = std::deque<Ptr<T>>

Definition at line 22 of file ast.h.

◆ Tag

Definition at line 7 of file bind.cpp.

Enumeration Type Documentation

◆ Prec

enum class mim::ast::Prec
strong
Enumerator
Err 
Bot 
Where 
Arrow 
Pi 
App 
Extract 
Lit 

Definition at line 106 of file tok.h.

Function Documentation

◆ is_rassoc()

bool mim::ast::is_rassoc ( Prec p)
inlineconstexpr

Definition at line 117 of file tok.h.

References Arrow.

◆ load_plugins() [1/4]

AST mim::ast::load_plugins ( World & world,
View< Sym > plugins )

◆ load_plugins() [2/4]

AST mim::ast::load_plugins ( World & w,
const std::string & plugin )
inline

Definition at line 959 of file ast.h.

References load_plugins().

◆ load_plugins() [3/4]

AST mim::ast::load_plugins ( World & w,
Sym sym )
inline

Definition at line 958 of file ast.h.

References load_plugins().

◆ load_plugins() [4/4]

AST mim::ast::load_plugins ( World & w,
View< std::string > plugins )
inline

Definition at line 955 of file ast.h.

References load_plugins().

◆ operator<<()

std::ostream & mim::ast::operator<< ( std::ostream & os,
Tok tok )

Definition at line 30 of file tok.cpp.

Variable Documentation

◆ Look_Ahead

size_t mim::ast::Look_Ahead = 2
constexpr

Definition at line 10 of file parser.h.

◆ Num_Keys

auto mim::ast::Num_Keys = size_t(0) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1) + size_t(1)
constexpr

Definition at line 54 of file tok.h.