unlogic
Loading...
Searching...
No Matches
unlogic Namespace Reference

Classes

struct  AdditionNode
 
struct  BinaryNode
 
struct  CallNode
 
class  Camera
 
struct  Color
 
class  Compiler
 
struct  DebugPrinter
 
struct  DivisionNode
 
struct  Error
 
struct  FunctionDefinitionNode
 
struct  IRGenerationContext
 
struct  IRGenerator
 
struct  Library
 
struct  LibrarySymbol
 
struct  Literal
 
struct  MultiplicationNode
 
struct  NumericLiteralNode
 
struct  overload
 
class  Plot2d
 
struct  PlotCommandNode
 
struct  PotentiationNode
 
class  Program
 
struct  ProgramEntryNode
 
class  Rect
 
struct  Scene
 
class  Scope
 
struct  ScopedBlockNode
 
class  Shape
 
struct  StringLiteralNode
 
struct  SubtractionNode
 
struct  VariableNode
 
struct  Vertex
 

Typedefs

using CompilationError = std::variant< Error, bf::Error, llvm::Error >
 
using Plot2dFunctionType = double(*)(double)
 
using Node = std::variant< std::monostate, struct NumericLiteralNode, struct StringLiteralNode, struct VariableNode, struct CallNode, struct AdditionNode, struct SubtractionNode, struct MultiplicationNode, struct DivisionNode, struct PotentiationNode, struct FunctionDefinitionNode, struct PlotCommandNode, struct ScopedBlockNode, struct ProgramEntryNode >
 
using UniqueNode = std::unique_ptr< Node >
 
using ParserValueType = std::variant< double, std::string, std::vector< std::string >, UniqueNode, std::vector< UniqueNode > >
 
using ParserGrammarType = bf::GrammarDefinition< ParserValueType, SyntaxHighlightingGroup >
 

Enumerations

enum  SyntaxHighlightingGroup {
  SyntaxOperator , SyntaxKeyword , SyntaxIdentifier , SyntaxLiteral ,
  SyntaxGrouper
}
 

Functions

template<typename T , typename ... Args>
UniqueNode unique_node (Args &&... args)
 
std::string load_file (std::filesystem::path const &path)
 
template<class... Ts>
 overload (Ts...) -> overload< Ts... >
 

Variables

Library runtime
 
Library stdlib
 
bf::NonTerminal< ParserGrammarType > & unlogic_program = program
 
template<class... >
constexpr bool always_false_v = false
 

Typedef Documentation

◆ CompilationError

using unlogic::CompilationError = typedef std::variant<Error, bf::Error, llvm::Error>

Definition at line 34 of file Compiler.h.

◆ Node

◆ ParserGrammarType

Definition at line 20 of file Parser.h.

◆ ParserValueType

using unlogic::ParserValueType = typedef std::variant<double, std::string, std::vector<std::string>, UniqueNode, std::vector<UniqueNode> >

Definition at line 19 of file Parser.h.

◆ Plot2dFunctionType

Definition at line 15 of file Plot.h.

◆ UniqueNode

using unlogic::UniqueNode = typedef std::unique_ptr<Node>

Definition at line 30 of file Node.h.

Enumeration Type Documentation

◆ SyntaxHighlightingGroup

Enumerator
SyntaxOperator 
SyntaxKeyword 
SyntaxIdentifier 
SyntaxLiteral 
SyntaxGrouper 

Definition at line 10 of file Parser.h.

Function Documentation

◆ load_file()

std::string unlogic::load_file ( std::filesystem::path const path)

Definition at line 4 of file io.cpp.

◆ overload()

template<class... Ts>
unlogic::overload ( Ts...  ) -> overload< Ts... >

◆ unique_node()

template<typename T , typename ... Args>
UniqueNode unlogic::unique_node ( Args &&...  args)

Definition at line 144 of file Node.h.

Variable Documentation

◆ always_false_v

template<class... >
constexpr bool unlogic::always_false_v = false
constexpr

Definition at line 16 of file overload.h.

◆ runtime

Library unlogic::runtime
extern

◆ stdlib

Library unlogic::stdlib
extern

◆ unlogic_program

bf::NonTerminal< G > & unlogic::unlogic_program = program
extern

Definition at line 200 of file Parser.cpp.