liblloyal 1.0.0
Composable primitives for llama.cpp inference
Loading...
Searching...
No Matches
minja Namespace Reference

Classes

struct  ArgumentsExpression
 
struct  ArgumentsValue
 
class  ArrayExpr
 
class  BinaryOpExpr
 
class  CallExpr
 
class  chat_template
 
struct  chat_template_caps
 
struct  chat_template_inputs
 
struct  chat_template_options
 
struct  CommentTemplateToken
 
class  Context
 
class  DictExpr
 
struct  ElifTemplateToken
 
struct  ElseTemplateToken
 
struct  EndFilterTemplateToken
 
struct  EndForTemplateToken
 
struct  EndGenerationTemplateToken
 
struct  EndIfTemplateToken
 
struct  EndMacroTemplateToken
 
struct  EndSetTemplateToken
 
class  Expression
 
class  ExpressionNode
 
struct  ExpressionTemplateToken
 
class  FilterExpr
 
class  FilterNode
 
struct  FilterTemplateToken
 
class  ForNode
 
struct  ForTemplateToken
 
struct  GenerationTemplateToken
 
class  IfExpr
 
class  IfNode
 
struct  IfTemplateToken
 
class  LiteralExpr
 
struct  Location
 
class  LoopControlException
 
class  LoopControlNode
 
struct  LoopControlTemplateToken
 
class  MacroNode
 
struct  MacroTemplateToken
 
class  MethodCallExpr
 
struct  Options
 
class  Parser
 
class  SequenceNode
 
class  SetNode
 
class  SetTemplateNode
 
struct  SetTemplateToken
 
class  SliceExpr
 
class  SubscriptExpr
 
class  TemplateNode
 
class  TemplateToken
 
class  TextNode
 
struct  TextTemplateToken
 
class  UnaryOpExpr
 
class  Value
 
class  VariableExpr
 

Enumerations

enum  SpaceHandling { Keep , Strip , StripSpaces , StripNewline }
 
enum class  LoopControlType { Break , Continue }
 

Functions

std::string normalize_newlines (const std::string &s)
 
static std::string error_location_suffix (const std::string &source, size_t pos)
 
static void destructuring_assign (const std::vector< std::string > &var_names, const std::shared_ptr< Context > &context, Value &item)
 
static bool in (const Value &value, const Value &container)
 
static std::string strip (const std::string &s, const std::string &chars="", bool left=true, bool right=true)
 
static std::vector< std::string > split (const std::string &s, const std::string &sep)
 
static std::string capitalize (const std::string &s)
 
static std::string html_escape (const std::string &s)
 
static Value simple_function (const std::string &fn_name, const std::vector< std::string > &params, const std::function< Value(const std::shared_ptr< Context > &, Value &args)> &fn)
 

Enumeration Type Documentation

◆ LoopControlType

enum class minja::LoopControlType
strong
Enumerator
Break 
Continue 

Definition at line 833 of file minja.hpp.

◆ SpaceHandling

Enumerator
Keep 
Strip 
StripSpaces 
StripNewline 

Definition at line 705 of file minja.hpp.

Function Documentation

◆ capitalize()

static std::string minja::capitalize ( const std::string &  s)
static

Definition at line 1440 of file minja.hpp.

◆ destructuring_assign()

static void minja::destructuring_assign ( const std::vector< std::string > &  var_names,
const std::shared_ptr< Context > &  context,
Value item 
)
static

Definition at line 691 of file minja.hpp.

◆ error_location_suffix()

static std::string minja::error_location_suffix ( const std::string &  source,
size_t  pos 
)
static

Definition at line 588 of file minja.hpp.

◆ html_escape()

static std::string minja::html_escape ( const std::string &  s)
static

Definition at line 1447 of file minja.hpp.

◆ in()

static bool minja::in ( const Value value,
const Value container 
)
static

Definition at line 1294 of file minja.hpp.

◆ normalize_newlines()

std::string minja::normalize_newlines ( const std::string &  s)
inline

Definition at line 48 of file minja.hpp.

◆ simple_function()

static Value minja::simple_function ( const std::string &  fn_name,
const std::vector< std::string > &  params,
const std::function< Value(const std::shared_ptr< Context > &, Value &args)> &  fn 
)
static

Definition at line 2626 of file minja.hpp.

◆ split()

static std::vector< std::string > minja::split ( const std::string &  s,
const std::string &  sep 
)
static

Definition at line 1427 of file minja.hpp.

◆ strip()

static std::string minja::strip ( const std::string &  s,
const std::string &  chars = "",
bool  left = true,
bool  right = true 
)
static

Definition at line 1419 of file minja.hpp.