NewLang Project
Yet another programm language
Loading...
Searching...
No Matches
newlang::NLC Class Reference

#include <nlc.h>

Public Types

enum class  Mode {
  MODE_NONE = 0 , MODE_VERSION , MODE_HEPL , MODE_PLAYGROUND_CGI ,
  EVAL_FILE , EVAL_SOURCE , MAKE_MODULE , MAKE_PROGRAMM ,
  REPL
}
 

Public Member Functions

 NLC ()
 
virtual ~NLC ()
 
std::string GetHelp ()
 
int Run (int argc, char **argv)
 
int RunREPL (RuntimePtr rt, ObjPtr main_args)
 

Static Public Member Functions

static void LoggerCallback (void *param, Logger::LogLevelType level, const char *str, bool flush)
 
static std::string url_encode (const std::string &decoded)
 
static std::string url_decode (const std::string &encoded)
 
static std::string AnswerCGI (std::string query, std::string respond)
 

Public Attributes

bool is_emit_cpp
 
std::string m_path
 
bool m_is_silent
 
std::string m_output
 
std::string m_eval
 
TermPtr m_args
 
Logger::LogLevelType m_loglevel_save
 
Logger::FuncCallbackm_log_callback_save
 
void * m_log_callback_arg_save
 
std::string m_log_file_dir
 
FILE * m_log_file
 

Detailed Description

Definition at line 77 of file nlc.h.

Member Enumeration Documentation

◆ Mode

enum class newlang::NLC::Mode
strong
Enumerator
MODE_NONE 
MODE_VERSION 
MODE_HEPL 
MODE_PLAYGROUND_CGI 
EVAL_FILE 
EVAL_SOURCE 
MAKE_MODULE 
MAKE_PROGRAMM 
REPL 

Definition at line 80 of file nlc.h.

Constructor & Destructor Documentation

◆ NLC()

newlang::NLC::NLC ( )
inline

Definition at line 155 of file nlc.h.

References m_log_callback_arg_save, m_log_callback_save, and m_log_file.

◆ ~NLC()

virtual newlang::NLC::~NLC ( )
inlinevirtual

Member Function Documentation

◆ LoggerCallback()

static void newlang::NLC::LoggerCallback ( void * param,
Logger::LogLevelType level,
const char * str,
bool flush )
inlinestatic

Definition at line 182 of file nlc.h.

References m_is_silent, m_log_file, and m_output.

Referenced by Run().

◆ url_encode()

static std::string newlang::NLC::url_encode ( const std::string & decoded)
inlinestatic

Definition at line 336 of file nlc.h.

References result.

Referenced by AnswerCGI().

◆ url_decode()

static std::string newlang::NLC::url_decode ( const std::string & encoded)
inlinestatic

Definition at line 343 of file nlc.h.

References result.

Referenced by Run().

◆ AnswerCGI()

static std::string newlang::NLC::AnswerCGI ( std::string query,
std::string respond )
inlinestatic

Definition at line 351 of file nlc.h.

References result, url_encode(), and VERSION_SOURCE_FULL_ID.

Referenced by Run().

◆ GetHelp()

std::string newlang::NLC::GetHelp ( )
inline

Definition at line 366 of file nlc.h.

Referenced by Run().

◆ Run()

◆ RunREPL()

int newlang::NLC::RunREPL ( RuntimePtr rt,
ObjPtr main_args )
inline

Definition at line 569 of file nlc.h.

References LOG_RUNTIME.

Referenced by Run().

Member Data Documentation

◆ is_emit_cpp

bool newlang::NLC::is_emit_cpp

Definition at line 134 of file nlc.h.

◆ m_path

std::string newlang::NLC::m_path

Definition at line 135 of file nlc.h.

◆ m_is_silent

bool newlang::NLC::m_is_silent

Definition at line 142 of file nlc.h.

Referenced by LoggerCallback(), and Run().

◆ m_output

std::string newlang::NLC::m_output

Definition at line 143 of file nlc.h.

Referenced by LoggerCallback(), and Run().

◆ m_eval

std::string newlang::NLC::m_eval

Definition at line 144 of file nlc.h.

◆ m_args

TermPtr newlang::NLC::m_args

Definition at line 146 of file nlc.h.

◆ m_loglevel_save

Logger::LogLevelType newlang::NLC::m_loglevel_save

Definition at line 149 of file nlc.h.

Referenced by Run().

◆ m_log_callback_save

Logger::FuncCallback* newlang::NLC::m_log_callback_save

Definition at line 150 of file nlc.h.

Referenced by NLC(), Run(), and ~NLC().

◆ m_log_callback_arg_save

void* newlang::NLC::m_log_callback_arg_save

Definition at line 151 of file nlc.h.

Referenced by NLC(), Run(), and ~NLC().

◆ m_log_file_dir

std::string newlang::NLC::m_log_file_dir

Definition at line 152 of file nlc.h.

Referenced by Run().

◆ m_log_file

FILE* newlang::NLC::m_log_file

Definition at line 153 of file nlc.h.

Referenced by LoggerCallback(), NLC(), and Run().


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