Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
thorin::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
 .ax ptrn: type = value; More...
 
class  BlockExpr
 { e } 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  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 Thorin 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

◆ thorin::ast::AnnexInfo.id

struct thorin::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

◆ thorin::ast::AnnexInfo.sym

struct thorin::ast::AnnexInfo.sym

Definition at line 34 of file ast.h.

Class Members
Sym plugin
Sym tag

Typedef Documentation

◆ ArrExpr

using thorin::ast::ArrExpr = typedef ArrOrPackExpr<true>

Definition at line 642 of file ast.h.

◆ Dbgs

using thorin::ast::Dbgs = typedef std::deque<Dbg>

Definition at line 23 of file ast.h.

◆ PackExpr

using thorin::ast::PackExpr = typedef ArrOrPackExpr<false>

Definition at line 643 of file ast.h.

◆ Ptr

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

Definition at line 21 of file ast.h.

◆ Ptrs

template<class T >
using thorin::ast::Ptrs = typedef 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 thorin::ast::Prec
strong
Enumerator
Err 
Bot 
Where 
Arrow 
Pi 
App 
Extract 
Lit 

Definition at line 107 of file tok.h.

Function Documentation

◆ is_rassoc()

constexpr bool thorin::ast::is_rassoc ( Prec  p)
inlineconstexpr

Definition at line 118 of file tok.h.

References Arrow.

◆ load_plugins() [1/4]

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

◆ load_plugins() [2/4]

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

Definition at line 965 of file ast.h.

References load_plugins().

◆ load_plugins() [3/4]

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

Definition at line 964 of file ast.h.

References load_plugins().

◆ load_plugins() [4/4]

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

Definition at line 961 of file ast.h.

References load_plugins().

◆ operator<<()

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

Definition at line 30 of file tok.cpp.

Variable Documentation

◆ Look_Ahead

constexpr size_t thorin::ast::Look_Ahead = 2
constexpr

Definition at line 10 of file parser.h.

◆ Num_Keys

constexpr auto thorin::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.