NewLang Project
Yet another programm language
Loading...
Searching...
No Matches
newlang Namespace Reference

Namespaces

namespace  runtime
 

Classes

class  AstAnalysis
 
struct  BigNum
 
class  BuiltInTorchDirect
 
struct  CompileInfo
 
class  Compiler
 
class  Context
 
class  CtxPush
 
class  Diag
 
class  Dict
 
struct  FileModule
 
struct  Func
 
class  GlobalObjects
 
class  IntAny
 
class  InternalName
 
class  IntMinus
 
class  IntPlus
 
struct  is_shared_ptr
 
struct  is_shared_ptr< std::shared_ptr< T > >
 
class  Iter
 
class  Iterator
 
class  JIT
 
class  LatterType
 
class  Logger
 
class  Macro
 
class  Module
 
class  NameLookupStack
 
class  NLC
 
class  Obj
 
class  Parser
 
class  ParserError
 
class  Rational
 
class  RunTime
 
class  Scanner
 
class  ScopePush
 
struct  ScopeVars
 
class  StorageTerm
 
class  StringMatcher
 
class  Sync
 
class  Term
 
class  Variable
 
class  VariableOp
 
struct  VariablePair
 
struct  VariableScope
 
struct  VariableShared
 
class  VariableTaken
 
struct  VariableWeak
 
class  VirtualFuncImpl
 

Typedefs

typedef std::vector< LatterTypeVariablePairList
 
typedef std::shared_timed_mutex Lock
 
typedef std::unique_lock< LockWriteLock
 
typedef std::shared_lock< LockReadLock
 
typedef std::vector< std::string > StringArray
 
typedef std::shared_ptr< ModuleModulePtr
 
typedef std::shared_ptr< runtime::BuildinBuildinPtr
 
typedef std::vector< TermPtrBlockType
 
typedef std::vector< ObjPtrArrayObjType
 
typedef std::shared_ptr< RunTimeRuntimePtr
 
typedef std::shared_ptr< DiagDiagPtr
 
typedef std::shared_ptr< MacroMacroPtr
 
typedef std::shared_ptr< ParserParserPtr
 
typedef std::shared_ptr< ContextRunnerPtr
 
typedef ObjPtr FunctionType(Context *ctx, Obj &in)
 
typedef ObjPtr(* EvalFunction) (Context *ctx, const TermPtr &term, Obj *args, bool eval_block)
 
typedef std::shared_ptr< std::string > SourceType
 
typedef std::vector< std::string > PostLexerType
 
typedef std::shared_ptr< ObjObjPtr
 
typedef std::shared_ptr< const ObjObjPtrConst
 
typedef std::weak_ptr< ObjObjWeak
 
typedef std::weak_ptr< const ObjObjWeakConst
 
typedef std::shared_ptr< TermTermPtr
 
typedef std::shared_ptr< const TermTermPtrConst
 
typedef std::shared_ptr< VariableVariablePtr
 
typedef std::variant< std::monostate, VariableShared, VariableWeak, VariableTaken, ObjPtr, int64_t, double, std::string, std::wstring, RationalVariableVariant
 

Enumerations

enum class  ConcatMode : uint8_t { Error = 0 , Append = 1 , Discard = 2 }
 
enum class  ExpandMacroResult : uint8_t { Continue , Break , Goto }
 
enum class  TermID : uint8_t {
  END = 0 , DEFINE_ENUM , NONE , SPACE ,
  INDENT , COMMENT , CRLF , DOC_BEFORE ,
  DOC_AFTER , SEQUENCE , BLOCK , BLOCK_TRY ,
  BLOCK_PLUS , BLOCK_MINUS , INT_PLUS , INT_MINUS ,
  INT_REPEAT , NAME , LOCAL , STATIC ,
  MACRO , MODULE , NATIVE , MANGLED ,
  TYPE , INTEGER , NUMBER , COMPLEX ,
  RATIONAL , STRWIDE , STRCHAR , TEMPLATE ,
  EVAL , EMPTY , ARGS , ARGUMENT ,
  NEWLANG , TYPENAME , TYPECAST , TYPEDUCK ,
  UNKNOWN , SYMBOL , NAMESPACE , PARENT ,
  ESCAPE , MACRO_SEQ , MACRO_STR , MACRO_DEL ,
  MACRO_TOSTR , MACRO_CONCAT , MACRO_ARGUMENT , MACRO_ARGNAME ,
  MACRO_ARGPOS , MACRO_ARGCOUNT , MACRO_ATTR , MACRO_EXPR ,
  CREATE_NEW , CREATE_USE , ASSIGN , PURE_USE ,
  PURE_NEW , APPEND , SWAP , SYM_RULE ,
  FUNCTION , COROUTINE , ITERATOR , FOLLOW ,
  WHILE , DOWHILE , MATCHING , WITH ,
  TAKE , RANGE , ELLIPSIS , FILLING ,
  INDEX , FIELD , TENSOR , SET ,
  DICT , CLASS , OP_LOGICAL , OP_MATH ,
  OP_COMPARE , OP_BITWISE , EMBED
}
 
enum class  ObjType : uint8_t {
  DEFINE_ENUM , None = static_cast<uint8_t>(0) , Bool = static_cast<uint8_t>(1) , Int8 = static_cast<uint8_t>(2) ,
  Char = static_cast<uint8_t>(3) , Byte = static_cast<uint8_t>(4) , Int16 = static_cast<uint8_t>(5) , Word = static_cast<uint8_t>(6) ,
  Int32 = static_cast<uint8_t>(7) , DWord = static_cast<uint8_t>(8) , Int64 = static_cast<uint8_t>(9) , DWord64 = static_cast<uint8_t>(10) ,
  Integer = static_cast<uint8_t>(15) , Float16 = static_cast<uint8_t>(16) , Float32 = static_cast<uint8_t>(17) , Single = static_cast<uint8_t>(18) ,
  Float64 = static_cast<uint8_t>(19) , Double = static_cast<uint8_t>(20) , Number = static_cast<uint8_t>(24) , Complex16 = static_cast<uint8_t>(25) ,
  Complex32 = static_cast<uint8_t>(26) , Complex64 = static_cast<uint8_t>(27) , Complex = static_cast<uint8_t>(31) , Tensor = static_cast<uint8_t>(32) ,
  Rational = static_cast<uint8_t>(33) , Arithmetic = static_cast<uint8_t>(47) , StrChar = static_cast<uint8_t>(48) , StrWide = static_cast<uint8_t>(49) ,
  FmtChar = static_cast<uint8_t>(50) , FmtWide = static_cast<uint8_t>(51) , ViewChar = static_cast<uint8_t>(52) , ViewWide = static_cast<uint8_t>(53) ,
  StdChar = static_cast<uint8_t>(54) , StdWide = static_cast<uint8_t>(55) , PtrChar = static_cast<uint8_t>(56) , PtrWide = static_cast<uint8_t>(57) ,
  String = static_cast<uint8_t>(59) , Iterator = static_cast<uint8_t>(62) , IteratorEnd = static_cast<uint8_t>(63) , Pointer = static_cast<uint8_t>(64) ,
  NativeFunc = static_cast<uint8_t>(65) , Function = static_cast<uint8_t>(70) , PureFunc = static_cast<uint8_t>(71) , Thread = static_cast<uint8_t>(80) ,
  Base = static_cast<uint8_t>(84) , Sys = static_cast<uint8_t>(85) , TorchTensor = static_cast<uint8_t>(86) , Range = static_cast<uint8_t>(104) ,
  Dictionary = static_cast<uint8_t>(105) , Interface = static_cast<uint8_t>(106) , Class = static_cast<uint8_t>(107) , Ellipsis = static_cast<uint8_t>(108) ,
  EVAL_FUNCTION = static_cast<uint8_t>(110) , BLOCK = static_cast<uint8_t>(111) , BLOCK_TRY = static_cast<uint8_t>(112) , BLOCK_PLUS = static_cast<uint8_t>(113) ,
  BLOCK_MINUS = static_cast<uint8_t>(114) , Macro = static_cast<uint8_t>(115) , Reference = static_cast<uint8_t>(117) , Virtual = static_cast<uint8_t>(118) ,
  Eval = static_cast<uint8_t>(119) , Other = static_cast<uint8_t>(120) , Plain = static_cast<uint8_t>(121) , Object = static_cast<uint8_t>(122) ,
  Any = static_cast<uint8_t>(123) , Type = static_cast<uint8_t>(200) , Struct = static_cast<uint8_t>(202) , Union = static_cast<uint8_t>(203) ,
  Enum = static_cast<uint8_t>(204) , RetPlus = static_cast<uint8_t>(210) , RetMinus = static_cast<uint8_t>(211) , RetRepeat = static_cast<uint8_t>(212) ,
  IntParser = static_cast<uint8_t>(213) , IntError = static_cast<uint8_t>(214) , Context = static_cast<uint8_t>(227) , Module = static_cast<uint8_t>(228) ,
  Undefined = static_cast<uint8_t>(229) , Error = static_cast<uint8_t>(230) , Break = static_cast<uint8_t>(231) , Continue = static_cast<uint8_t>(232) ,
  ErrorParser = static_cast<uint8_t>(241) , ErrorRunTime = static_cast<uint8_t>(242) , ErrorSignal = static_cast<uint8_t>(243)
}
 
enum class  RefType : uint8_t {
  Value = 0 , Shared = 1 , LiteSingle = 2 , LiteThread = 3 ,
  SyncMono = 4 , SyncMulti = 5 , SharedConst = 6 , LiteSingleConst = 7 ,
  LiteThreadConst = 8 , SyncMonoConst = 9 , SyncMultiConst = 10
}
 
enum class  VariableCase : uint8_t {
  DEFINE_ENUM , EMPTY = static_cast<uint8_t>(0) , SHARED = static_cast<uint8_t>(1) , WEAK = static_cast<uint8_t>(2) ,
  TAKEN = static_cast<uint8_t>(3) , OBJECT = static_cast<uint8_t>(4) , INTEGER = static_cast<uint8_t>(5) , DOUBLE = static_cast<uint8_t>(6) ,
  STRING = static_cast<uint8_t>(7) , WSTRING = static_cast<uint8_t>(8) , RATIONAL = static_cast<uint8_t>(9)
}
 

Functions

newlang::ObjPtr clone (newlang::Context *ctx, newlang::Obj &in)
 
newlang::ObjPtr const_ (newlang::Context *ctx, newlang::Obj &in)
 
newlang::ObjPtr mutable_ (newlang::Context *ctx, newlang::Obj &in)
 
newlang::ObjPtr min (const newlang::Context *ctx, const newlang::Obj &in)
 
newlang::ObjPtr newlang_min (const newlang::Context *ctx, const newlang::ObjPtr in)
 
template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang_newlang_min (newlang::Context *ctx, T ... args)
 
newlang::ObjPtr max (const newlang::Context *ctx, const newlang::Obj &in)
 
newlang::ObjPtr newlang_max (const newlang::Context *ctx, const newlang::ObjPtr in)
 
template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang_newlang_max (newlang::Context *ctx, T ... args)
 
newlang::ObjPtr newlang_maks (const newlang::Context *ctx, const newlang::ObjPtr in)
 
template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang_newlang_maks (newlang::Context *ctx, T ... args)
 
newlang::ObjPtr clone (const newlang::Context *ctx, const newlang::Obj &in)
 
newlang::ObjPtr newlang_clone (const newlang::Context *ctx, const newlang::ObjPtr in)
 
template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang_newlang_clone (newlang::Context *ctx, T ... args)
 
newlang::ObjPtr const_ (const newlang::Context *ctx, const newlang::Obj &in)
 
newlang::ObjPtr newlang_const_ (const newlang::Context *ctx, const newlang::ObjPtr in)
 
template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang_newlang_const_ (newlang::Context *ctx, T ... args)
 
newlang::ObjPtr mutable_ (const newlang::Context *ctx, const newlang::Obj &in)
 
newlang::ObjPtr newlang_mutable_ (const newlang::Context *ctx, const newlang::ObjPtr in)
 
template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang_newlang_mutable_ (newlang::Context *ctx, T ... args)
 
newlang::ObjPtr help (const newlang::Context *ctx, const newlang::Obj &in)
 
newlang::ObjPtr newlang_help (const newlang::Context *ctx, const newlang::ObjPtr in)
 
template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang_newlang_help (newlang::Context *ctx, T ... args)
 
bool Tranliterate (const wchar_t c, std::wstring &str)
 
std::string MangleName (const char *name)
 
std::string MangaledFuncCPP (const char *name, const char *space=nullptr)
 
std::string MangaledFunc (const std::string name)
 
void SplitString (const ::std::string &str, char delimiter, ::std::vector< ::std::string > *dest)
 
static bool PatternMatchesString (const std::string &name_str, const char *pattern, const char *pattern_end)
 
bool IsGlobPattern (const std::string &pattern)
 
template<typename T >
std::enable_if< std::is_same< T, std::string >::value, std::string >::type DumpToString (const T &obj)
 
template<typename T >
std::enable_if<!std::is_same< T, std::string >::value, std::string >::type DumpToString (const T &obj)
 
template<typename T >
std::string Dump (const T &iterable)
 
std::vector< int64_t > TensorShapeFromDict (const Obj *obj)
 
ObjPtr CheckSystemField (const Obj *obj, const std::string name)
 
int64_t ConcatData (Obj *dest, Obj &src, ConcatMode mode=ConcatMode::Error)
 
TermPtr ProcessMacro (Parser &parser, TermPtr &term)
 
ExpandMacroResult ExpandTermMacro (Parser &parser)
 
EXTERN_C int nlc_prinft_sub_ (char const *format,...)
 
int RunMain (const int arg, const char **argv, const char **penv)
 
std::string GetFileExt (const char *str)
 
std::string AddDefaultFileExt (const char *str, const char *ext_default)
 
std::string ReplaceFileExt (const char *str, const char *ext_old, const char *ext_new)
 
std::string ReadFile (const char *fileName)
 
std::string GetDoc (std::string name)
 
std::string MakeConstructorName (std::string name)
 
std::string MakeLocalName (std::string name)
 
ObjType typeFromString (TermPtr &term, RunTime *rt, bool *has_error)
 
const char * toString (TermID type)
 
size_t IndexArg (TermPtr term)
 
std::string ParserMessage (std::string &buffer, int row, int col, const char *format,...)
 
static bool IsAnyCreate (TermID id)
 
std::ostream & operator<< (std::ostream &out, newlang::TermPtr &var)
 
std::ostream & operator<< (std::ostream &out, newlang::TermPtr var)
 
std::string & rtrim (std::string &s, const char *t=ws)
 
std::string & ltrim (std::string &s, const char *t=ws)
 
std::string & trim (std::string &s, const char *t=ws)
 
template<typename T >
repeat (T str, const std::size_t n)
 
template<class T >
BaseFileName (T const &path, T const &delims="/\\")
 
template<class T >
RemoveFileExtension (T const &filename)
 
void NewLangSignalHandler (int signal)
 
void ParserException (const char *msg, std::string &buffer, int row, int col)
 
const char * toString (ObjType type)
 
const char * toCXXType (ObjType type, bool int_bool)
 
ObjType GetBaseTypeFromString (const std::string_view type_arg, bool *has_error=nullptr)
 
const char * toCXXRef (const std::string_view ref)
 
bool isGenericType (ObjType t)
 
bool isNativeType (ObjType t)
 
bool isObjectType (ObjType t)
 
bool isDefaultType (const TermPtr &term)
 
const TermPtr getDefaultType (const std::string_view text)
 
const TermPtr getDefaultType (ObjType type)
 
const TermPtr getNoneTerm ()
 
const TermPtr getEllipsysTerm ()
 
const TermPtr getRequiredTerm ()
 
const ObjPtr getNoneObj ()
 
const VariablegetNoneVar ()
 
const ObjPtr getEllipsysObj ()
 
const VariablePtr getEllipsysVar ()
 
const VariablePairgetNonePair ()
 
bool isBaseType (ObjType t)
 
bool isFunction (ObjType t)
 
bool isNative (ObjType t)
 
bool isEval (ObjType t)
 
bool isSimpleType (ObjType t)
 
bool isIntegralType (ObjType t, bool includeBool)
 
bool isFloatingType (ObjType t)
 
bool isComplexType (ObjType t)
 
bool isTensor (ObjType t)
 
bool isBooleanType (ObjType t)
 
bool isArithmeticType (ObjType t)
 
bool isStringChar (ObjType t)
 
bool isStringWide (ObjType t)
 
bool isString (ObjType t)
 
bool isInterrupt (ObjType t)
 
bool isPlainDataType (ObjType t)
 
bool isDictionary (ObjType t)
 
bool isClass (ObjType t)
 
bool isEllipsis (ObjType t)
 
bool isRange (ObjType t)
 
bool isTypeName (ObjType t)
 
bool isModule (ObjType t)
 
bool isIndexingType (ObjType curr, ObjType fix)
 
bool isLocalType (ObjType)
 
ObjType typeFromLimit (int64_t value, ObjType type_default=ObjType::Int64)
 
ObjType typeFromLimit (double value, ObjType type_default=ObjType::Float64)
 
bool canCastLimit (const ObjType from, const ObjType to)
 
bool canCast (const ObjType from, const ObjType to)
 
bool canCast (const std::string from, const std::string to)
 
bool canCast (const TermPtr &from, const ObjType to)
 
bool canCast (const TermPtr &from, const TermPtr &to)
 
int64_t parseInteger (const char *str)
 
double parseDouble (const char *str)
 
std::complex< double > parseComplex (const char *)
 
bool isReservedName (const std::string_view name)
 
bool isInternalName (const std::string_view name)
 
bool isMangledName (const std::string_view name)
 
bool isModuleName (const std::string_view name)
 
bool isStaticName (const std::string_view name)
 
bool isFieldName (const std::string_view name)
 
bool isTrivialName (const std::string_view name)
 
bool isLocalName (const std::string_view name)
 
bool isGlobalScope (const std::string_view name)
 
bool isModuleScope (const std::string_view name)
 
bool isTypeName (const std::string_view name)
 
bool isFullName (const std::string_view name)
 
bool isMacroName (const std::string_view name)
 
bool isNativeName (const std::string_view name)
 
bool isLocalAnyName (const std::string_view name)
 
bool isSystemName (const std::string_view name)
 
bool isPrivateName (const std::string_view name)
 
bool isHidenName (const std::string_view name)
 
bool isVariableName (const std::string_view name)
 
bool isConstName (const std::string_view name)
 
std::string NormalizeName (const std::string_view name)
 
std::string MakeName (std::string name)
 
std::string ExtractModuleName (const std::string_view name)
 
bool CheckCharModuleName (const std::string_view name)
 
std::string ExtractName (std::string name)
 
bool isContainsType (ObjType generic, ObjType type)
 
std::string utf8_encode (const std::wstring wstr)
 
std::wstring utf8_decode (const std::string str)
 
constexpr RefType RefTypeFromString (const std::string_view text)
 
constexpr bool isLiteRef (RefType type)
 
constexpr bool isLiteSyncRef (RefType type)
 
bool isHeavyRef (RefType type)
 
constexpr bool isConstRef (RefType type)
 
constexpr bool isEditableRef (RefType type)
 
constexpr bool isValidReference (RefType type, RefType test)
 
const char * VariableCaseToString (size_t index)
 

Variables

static constexpr const char * ws = " \t\n\r\f\v"
 

Typedef Documentation

◆ VariablePairList

typedef std::vector< LatterType > newlang::VariablePairList

Definition at line 109 of file context.h.

◆ Lock

typedef std::shared_timed_mutex newlang::Lock

Definition at line 157 of file runtime.h.

◆ WriteLock

typedef std::unique_lock< Lock > newlang::WriteLock

Definition at line 168 of file runtime.h.

◆ ReadLock

typedef std::shared_lock< Lock > newlang::ReadLock

Definition at line 169 of file runtime.h.

◆ StringArray

typedef std::vector<std::string> newlang::StringArray

Definition at line 148 of file types.h.

◆ ModulePtr

typedef std::shared_ptr<Module> newlang::ModulePtr

Definition at line 167 of file types.h.

◆ BuildinPtr

typedef std::shared_ptr<runtime::Buildin> newlang::BuildinPtr

Definition at line 168 of file types.h.

◆ BlockType

typedef std::vector<TermPtr> newlang::BlockType

Definition at line 239 of file types.h.

◆ ArrayObjType

typedef std::vector<ObjPtr> newlang::ArrayObjType

Definition at line 240 of file types.h.

◆ RuntimePtr

typedef std::shared_ptr<RunTime> newlang::RuntimePtr

Definition at line 242 of file types.h.

◆ DiagPtr

typedef std::shared_ptr<Diag> newlang::DiagPtr

Definition at line 243 of file types.h.

◆ MacroPtr

typedef std::shared_ptr<Macro> newlang::MacroPtr

Definition at line 244 of file types.h.

◆ ParserPtr

typedef std::shared_ptr<Parser> newlang::ParserPtr

Definition at line 245 of file types.h.

◆ RunnerPtr

typedef std::shared_ptr<Context> newlang::RunnerPtr

Definition at line 246 of file types.h.

◆ FunctionType

typedef ObjPtr newlang::FunctionType(Context *ctx, Obj &in)

Definition at line 248 of file types.h.

◆ EvalFunction

typedef ObjPtr(* newlang::EvalFunction) (Context *ctx, const TermPtr &term, Obj *args, bool eval_block)

Definition at line 252 of file types.h.

◆ SourceType

typedef std::shared_ptr<std::string> newlang::SourceType

Definition at line 254 of file types.h.

◆ PostLexerType

typedef std::vector<std::string> newlang::PostLexerType

Definition at line 255 of file types.h.

◆ ObjPtr

typedef std::shared_ptr<Obj> newlang::ObjPtr

Definition at line 28 of file variable.h.

◆ ObjPtrConst

typedef std::shared_ptr<const Obj> newlang::ObjPtrConst

Definition at line 29 of file variable.h.

◆ ObjWeak

typedef std::weak_ptr<Obj> newlang::ObjWeak

Definition at line 30 of file variable.h.

◆ ObjWeakConst

typedef std::weak_ptr<const Obj> newlang::ObjWeakConst

Definition at line 31 of file variable.h.

◆ TermPtr

typedef std::shared_ptr<Term> newlang::TermPtr

Definition at line 33 of file variable.h.

◆ TermPtrConst

typedef std::shared_ptr<const Term> newlang::TermPtrConst

Definition at line 34 of file variable.h.

◆ VariablePtr

typedef std::shared_ptr<Variable> newlang::VariablePtr

Definition at line 131 of file variable.h.

◆ VariableVariant

typedef std::variant< std::monostate, VariableShared, VariableWeak, VariableTaken, ObjPtr, int64_t, double, std::string, std::wstring, Rational > newlang::VariableVariant

Варианты данных для хрения в классе Variable

Definition at line 400 of file variable.h.

Enumeration Type Documentation

◆ ConcatMode

enum class newlang::ConcatMode : uint8_t
strong
Enumerator
Error 
Append 
Discard 

Definition at line 48 of file object.h.

◆ ExpandMacroResult

enum class newlang::ExpandMacroResult : uint8_t
strong
Enumerator
Continue 
Break 
Goto 

Definition at line 19 of file parser.h.

◆ TermID

enum class newlang::TermID : uint8_t
strong
Enumerator
END 
DEFINE_ENUM 
NONE 
SPACE 
INDENT 
COMMENT 
CRLF 
DOC_BEFORE 
DOC_AFTER 
SEQUENCE 
BLOCK 
BLOCK_TRY 
BLOCK_PLUS 
BLOCK_MINUS 
INT_PLUS 
INT_MINUS 
INT_REPEAT 
NAME 
LOCAL 
STATIC 
MACRO 
MODULE 
NATIVE 
MANGLED 
TYPE 
INTEGER 
NUMBER 
COMPLEX 
RATIONAL 
STRWIDE 
STRCHAR 
TEMPLATE 
EVAL 
EMPTY 
ARGS 
ARGUMENT 
NEWLANG 
TYPENAME 
TYPECAST 
TYPEDUCK 
UNKNOWN 
SYMBOL 
NAMESPACE 
PARENT 
ESCAPE 
MACRO_SEQ 
MACRO_STR 
MACRO_DEL 
MACRO_TOSTR 
MACRO_CONCAT 
MACRO_ARGUMENT 
MACRO_ARGNAME 
MACRO_ARGPOS 
MACRO_ARGCOUNT 
MACRO_ATTR 
MACRO_EXPR 
CREATE_NEW 
CREATE_USE 
ASSIGN 
PURE_USE 
PURE_NEW 
APPEND 
SWAP 
SYM_RULE 
FUNCTION 
COROUTINE 
ITERATOR 
FOLLOW 
WHILE 
DOWHILE 
MATCHING 
WITH 
TAKE 
RANGE 
ELLIPSIS 
FILLING 
INDEX 
FIELD 
TENSOR 
SET 
DICT 
CLASS 
OP_LOGICAL 
OP_MATH 
OP_COMPARE 
OP_BITWISE 
EMBED 

Definition at line 119 of file term.h.

◆ ObjType

enum class newlang::ObjType : uint8_t
strong
Enumerator
DEFINE_ENUM 
None 
Bool 
Int8 
Char 
Byte 
Int16 
Word 
Int32 
DWord 
Int64 
DWord64 
Integer 
Float16 
Float32 
Single 
Float64 
Double 
Number 
Complex16 
Complex32 
Complex64 
Complex 
Tensor 
Rational 
Arithmetic 
StrChar 
StrWide 
FmtChar 
FmtWide 
ViewChar 
ViewWide 
StdChar 
StdWide 
PtrChar 
PtrWide 
String 
Iterator 
IteratorEnd 
Pointer 
NativeFunc 
Function 
PureFunc 
Thread 
Base 
Sys 
TorchTensor 
Range 
Dictionary 
Interface 
Class 
Ellipsis 
EVAL_FUNCTION 
BLOCK 
BLOCK_TRY 
BLOCK_PLUS 
BLOCK_MINUS 
Macro 
Reference 
Virtual 
Eval 
Other 
Plain 
Object 
Any 
Type 
Struct 
Union 
Enum 
RetPlus 
RetMinus 
RetRepeat 
IntParser 
IntError 
Context 
Module 
Undefined 
Error 
Break 
Continue 
ErrorParser 
ErrorRunTime 
ErrorSignal 

Definition at line 524 of file types.h.

◆ RefType

enum class newlang::RefType : uint8_t
strong

Типы ссылочных объектов

Enumerator
Value 
Shared 
LiteSingle 
LiteThread 
SyncMono 
SyncMulti 
SharedConst 
LiteSingleConst 
LiteThreadConst 
SyncMonoConst 
SyncMultiConst 

Definition at line 40 of file variable.h.

◆ VariableCase

enum class newlang::VariableCase : uint8_t
strong
Enumerator
DEFINE_ENUM 
EMPTY 
SHARED 
WEAK 
TAKEN 
OBJECT 
INTEGER 
DOUBLE 
STRING 
WSTRING 
RATIONAL 

Definition at line 417 of file variable.h.

Function Documentation

◆ clone() [1/2]

◆ const_() [1/2]

newlang::ObjPtr newlang::const_ ( newlang::Context * ctx,
newlang::Obj & in )

Definition at line 46 of file builtin.cpp.

References LOG_RUNTIME.

◆ mutable_() [1/2]

newlang::ObjPtr newlang::mutable_ ( newlang::Context * ctx,
newlang::Obj & in )

Definition at line 53 of file builtin.cpp.

References LOG_RUNTIME.

◆ min()

newlang::ObjPtr newlang::min ( const newlang::Context * ctx,
const newlang::Obj & in )

◆ newlang_min()

newlang::ObjPtr newlang::newlang_min ( const newlang::Context * ctx,
const newlang::ObjPtr in )
inline

Definition at line 51 of file builtin.h.

◆ newlang_newlang_min()

template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang::newlang_newlang_min ( newlang::Context * ctx,
T ... args )

Definition at line 51 of file builtin.h.

◆ max()

newlang::ObjPtr newlang::max ( const newlang::Context * ctx,
const newlang::Obj & in )

◆ newlang_max()

newlang::ObjPtr newlang::newlang_max ( const newlang::Context * ctx,
const newlang::ObjPtr in )
inline

Definition at line 52 of file builtin.h.

◆ newlang_newlang_max()

template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang::newlang_newlang_max ( newlang::Context * ctx,
T ... args )

Definition at line 52 of file builtin.h.

◆ newlang_maks()

newlang::ObjPtr newlang::newlang_maks ( const newlang::Context * ctx,
const newlang::ObjPtr in )
inline

Definition at line 53 of file builtin.h.

◆ newlang_newlang_maks()

template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang::newlang_newlang_maks ( newlang::Context * ctx,
T ... args )

Definition at line 53 of file builtin.h.

◆ clone() [2/2]

newlang::ObjPtr newlang::clone ( const newlang::Context * ctx,
const newlang::Obj & in )

◆ newlang_clone()

newlang::ObjPtr newlang::newlang_clone ( const newlang::Context * ctx,
const newlang::ObjPtr in )
inline

Definition at line 55 of file builtin.h.

◆ newlang_newlang_clone()

template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang::newlang_newlang_clone ( newlang::Context * ctx,
T ... args )

Definition at line 55 of file builtin.h.

◆ const_() [2/2]

newlang::ObjPtr newlang::const_ ( const newlang::Context * ctx,
const newlang::Obj & in )

◆ newlang_const_()

newlang::ObjPtr newlang::newlang_const_ ( const newlang::Context * ctx,
const newlang::ObjPtr in )
inline

Definition at line 56 of file builtin.h.

◆ newlang_newlang_const_()

template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang::newlang_newlang_const_ ( newlang::Context * ctx,
T ... args )

Definition at line 56 of file builtin.h.

◆ mutable_() [2/2]

newlang::ObjPtr newlang::mutable_ ( const newlang::Context * ctx,
const newlang::Obj & in )

◆ newlang_mutable_()

newlang::ObjPtr newlang::newlang_mutable_ ( const newlang::Context * ctx,
const newlang::ObjPtr in )
inline

Definition at line 57 of file builtin.h.

◆ newlang_newlang_mutable_()

template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang::newlang_newlang_mutable_ ( newlang::Context * ctx,
T ... args )

Definition at line 57 of file builtin.h.

◆ help()

newlang::ObjPtr newlang::help ( const newlang::Context * ctx,
const newlang::Obj & in )

◆ newlang_help()

newlang::ObjPtr newlang::newlang_help ( const newlang::Context * ctx,
const newlang::ObjPtr in )
inline

Definition at line 63 of file builtin.h.

◆ newlang_newlang_help()

template<typename... T>
std::enable_if< newlang::is_all< newlang::Obj::PairType, T... >::value, newlang::ObjPtr >::type newlang::newlang_newlang_help ( newlang::Context * ctx,
T ... args )

Definition at line 63 of file builtin.h.

◆ Tranliterate()

bool newlang::Tranliterate ( const wchar_t c,
std::wstring & str )

Definition at line 44 of file jit.cpp.

Referenced by MangleName().

◆ MangleName()

std::string newlang::MangleName ( const char * name)

Definition at line 209 of file jit.cpp.

References ALLOW_CHAR, NEWLANG_PREFIX, result, and Tranliterate().

◆ MangaledFuncCPP()

std::string newlang::MangaledFuncCPP ( const char * name,
const char * space = nullptr )

Definition at line 188 of file jit.cpp.

References result.

◆ MangaledFunc()

std::string newlang::MangaledFunc ( const std::string name)

Definition at line 201 of file jit.cpp.

References isConstName(), and result.

◆ SplitString()

void newlang::SplitString ( const ::std::string & str,
char delimiter,
::std::vector< ::std::string > * dest )
inline

Definition at line 153 of file logger.h.

Referenced by newlang::StringMatcher::StringMatcher().

◆ PatternMatchesString()

static bool newlang::PatternMatchesString ( const std::string & name_str,
const char * pattern,
const char * pattern_end )
static

Definition at line 176 of file logger.h.

◆ IsGlobPattern()

bool newlang::IsGlobPattern ( const std::string & pattern)
inline

Definition at line 223 of file logger.h.

Referenced by newlang::StringMatcher::StringMatcher().

◆ DumpToString() [1/2]

template<typename T >
std::enable_if< std::is_same< T, std::string >::value, std::string >::type newlang::DumpToString ( const T & obj)

Definition at line 295 of file logger.h.

Referenced by Dump().

◆ DumpToString() [2/2]

template<typename T >
std::enable_if<!std::is_same< T, std::string >::value, std::string >::type newlang::DumpToString ( const T & obj)

Definition at line 301 of file logger.h.

◆ Dump()

template<typename T >
std::string newlang::Dump ( const T & iterable)

Definition at line 306 of file logger.h.

References DumpToString(), and result.

◆ TensorShapeFromDict()

std::vector< int64_t > newlang::TensorShapeFromDict ( const Obj * obj)

Definition at line 2132 of file object.cpp.

References ShapeFromDict().

Referenced by newlang::Context::CreateTensor().

◆ CheckSystemField()

◆ ConcatData()

◆ ProcessMacro()

TermPtr newlang::ProcessMacro ( Parser & parser,
TermPtr & term )

◆ ExpandTermMacro()

◆ nlc_prinft_sub_()

EXTERN_C int newlang::nlc_prinft_sub_ ( char const * format,
... )

◆ RunMain()

int newlang::RunMain ( const int arg,
const char ** argv,
const char ** penv )

Definition at line 69 of file runtime.cpp.

◆ GetFileExt()

std::string newlang::GetFileExt ( const char * str)

Definition at line 1917 of file runtime.cpp.

Referenced by AddDefaultFileExt(), and ReplaceFileExt().

◆ AddDefaultFileExt()

std::string newlang::AddDefaultFileExt ( const char * str,
const char * ext_default )

Definition at line 1927 of file runtime.cpp.

References GetFileExt().

◆ ReplaceFileExt()

std::string newlang::ReplaceFileExt ( const char * str,
const char * ext_old,
const char * ext_new )

Definition at line 1937 of file runtime.cpp.

References GetFileExt().

◆ ReadFile()

std::string newlang::ReadFile ( const char * fileName)

Definition at line 1952 of file runtime.cpp.

Referenced by newlang::JIT::RunFile().

◆ GetDoc()

std::string newlang::GetDoc ( std::string name)

Definition at line 2251 of file runtime.cpp.

◆ MakeConstructorName()

std::string newlang::MakeConstructorName ( std::string name)

Definition at line 2256 of file runtime.cpp.

References ASSERT, isTypeName(), and result.

◆ MakeLocalName()

std::string newlang::MakeLocalName ( std::string name)

◆ typeFromString()

◆ toString() [1/2]

const char * newlang::toString ( TermID type)
inline

Definition at line 126 of file term.h.

References DEFINE_CASE, END, LOG_ERROR, and NL_TERMS.

Referenced by newlang::Obj::at_index(), newlang::Obj::at_index_const(), newlang::Obj::BaseTypeConstructor(), newlang::Obj::begin(), newlang::Obj::begin(), newlang::runtime::Buildin::Buildin(), newlang::AstAnalysis::CalcSummaryType(), newlang::Context::Call(), newlang::Context::CallNative_(), newlang::AstAnalysis::CheckCall(), newlang::AstAnalysis::CheckIndex_(), newlang::AstAnalysis::CheckOpType(), newlang::AstAnalysis::CheckStrPrintf(), CheckSystemField(), newlang::Obj::ConstructorSimpleType_(), newlang::Obj::ConstructorStruct_(), newlang::Obj::CreateBaseType(), CreateFromGenericValue(), newlang::AstAnalysis::CreateOp_(), newlang::Obj::CreateValue(), newlang::Obj::end(), newlang::Obj::end(), newlang::Obj::erase(), newlang::Obj::erase(), newlang::Context::EvalDoWhile_(), newlang::Context::EvalInterrupt_(), newlang::Context::EvalTerm(), newlang::Context::EvalTryBlock_(), newlang::Context::EvalWhile_(), newlang::Macro::ExpandString(), ExpandTermMacro(), newlang::Macro::ExtractArgs(), newlang::Obj::find(), getDefaultType(), newlang::runtime::System::getenv(), GetGenericValueRef(), newlang::Obj::GetIndex(), newlang::Context::GetIndexValue(), newlang::Macro::GetMacroId(), newlang::Obj::GetValueAsString(), newlang::Obj::insert(), newlang::Obj::IteratorData(), newlang::Obj::IteratorReset(), newlang::Macro::MakeMacroId(), newlang::Obj::op_class_test(), newlang::Obj::op_class_test(), newlang::Obj::op_compare(), newlang::Obj::op_div_ceil_(), newlang::Obj::op_equal(), newlang::Obj::operator%=(), newlang::Obj::operator*=(), newlang::Obj::operator+=(), newlang::Obj::operator-=(), newlang::Obj::operator/=(), newlang::Obj::operator[](), newlang::Obj::operator[](), newlang::Obj::push_back(), newlang::Obj::push_back(), newlang::AstAnalysis::RecursiveAnalyzer(), newlang::RunTime::RegisterBuildinType(), newlang::Obj::resize(), newlang::Obj::resize_(), newlang::Context::SetIndexValue(), newlang::Obj::SetValue_(), newlang::runtime::System::system(), TensorToString(), newlang::Obj::testConvertType(), newlang::Obj::testResultIntegralType(), toCXXType(), toIndex(), toLLVMType(), newlang::Obj::toString(), newlang::Term::toString(), toTorchType(), and newlang::Obj::toType_().

◆ IndexArg()

size_t newlang::IndexArg ( TermPtr term)

Definition at line 6 of file term.cpp.

References ASSERT, and LOG_RUNTIME.

◆ ParserMessage()

std::string newlang::ParserMessage ( std::string & buffer,
int row,
int col,
const char * format,
... )

Definition at line 525 of file parser.cpp.

Referenced by newlang::Scanner::LexerError(), and ParserException().

◆ IsAnyCreate()

static bool newlang::IsAnyCreate ( TermID id)
inlinestatic

Definition at line 146 of file term.h.

References ASSIGN, CREATE_NEW, CREATE_USE, PURE_NEW, and PURE_USE.

◆ operator<<() [1/2]

std::ostream & newlang::operator<< ( std::ostream & out,
newlang::TermPtr & var )

◆ operator<<() [2/2]

std::ostream & newlang::operator<< ( std::ostream & out,
newlang::TermPtr var )

◆ rtrim()

std::string & newlang::rtrim ( std::string & s,
const char * t = ws )
inline

Definition at line 101 of file types.h.

Referenced by trim().

◆ ltrim()

std::string & newlang::ltrim ( std::string & s,
const char * t = ws )
inline

Definition at line 106 of file types.h.

Referenced by trim().

◆ trim()

std::string & newlang::trim ( std::string & s,
const char * t = ws )
inline

Definition at line 111 of file types.h.

References ltrim(), and rtrim().

Referenced by newlang::Obj::GetValueAsString().

◆ repeat()

template<typename T >
T newlang::repeat ( T str,
const std::size_t n )

◆ BaseFileName()

template<class T >
T newlang::BaseFileName ( T const & path,
T const & delims = "/\\" )

Definition at line 137 of file types.h.

Referenced by newlang::RunTime::ModuleRead(), and newlang::RunTime::ModuleSave().

◆ RemoveFileExtension()

template<class T >
T newlang::RemoveFileExtension ( T const & filename)

Definition at line 142 of file types.h.

Referenced by newlang::RunTime::ModuleRead(), and newlang::RunTime::ModuleSave().

◆ NewLangSignalHandler()

void newlang::NewLangSignalHandler ( int signal)

◆ ParserException()

void newlang::ParserException ( const char * msg,
std::string & buffer,
int row,
int col )

Definition at line 579 of file parser.cpp.

References ParserMessage().

◆ toString() [2/2]

const char * newlang::toString ( ObjType type)
inline

Definition at line 533 of file types.h.

References DEFINE_CASE, LOG_RUNTIME, and NL_TYPES.

◆ toCXXType()

const char * newlang::toCXXType ( ObjType type,
bool int_bool )
inline

Definition at line 552 of file types.h.

References Bool, Byte, Char, Double, DWord, DWord64, Float32, Float64, Int16, Int32, Int64, Int8, LOG_RUNTIME, None, Single, toString(), and Word.

◆ GetBaseTypeFromString()

ObjType newlang::GetBaseTypeFromString ( const std::string_view type_arg,
bool * has_error = nullptr )

◆ toCXXRef()

const char * newlang::toCXXRef ( const std::string_view ref)
inline

Definition at line 602 of file types.h.

References LOG_RUNTIME.

◆ isGenericType()

◆ isNativeType()

bool newlang::isNativeType ( ObjType t)
inline

◆ isObjectType()

bool newlang::isObjectType ( ObjType t)
inline

Definition at line 678 of file types.h.

References Class, Dictionary, and Interface.

◆ isDefaultType()

◆ getDefaultType() [1/2]

const TermPtr newlang::getDefaultType ( const std::string_view text)

◆ getDefaultType() [2/2]

const TermPtr newlang::getDefaultType ( ObjType type)

Definition at line 1068 of file parser.cpp.

References getDefaultType(), and toString().

◆ getNoneTerm()

const TermPtr newlang::getNoneTerm ( )

Definition at line 1028 of file parser.cpp.

References term_none.

◆ getEllipsysTerm()

const TermPtr newlang::getEllipsysTerm ( )

Definition at line 1036 of file parser.cpp.

References term_ellipsys.

◆ getRequiredTerm()

const TermPtr newlang::getRequiredTerm ( )

Definition at line 1032 of file parser.cpp.

References term_required.

◆ getNoneObj()

const ObjPtr newlang::getNoneObj ( )

Definition at line 1040 of file parser.cpp.

References obj_none.

Referenced by newlang::Context::EvalLeftVars_().

◆ getNoneVar()

const Variable & newlang::getNoneVar ( )

Definition at line 1044 of file parser.cpp.

References var_none.

Referenced by newlang::Context::EvalTryBlock_().

◆ getEllipsysObj()

const ObjPtr newlang::getEllipsysObj ( )

Definition at line 1048 of file parser.cpp.

References obj_ellipsys.

Referenced by newlang::Context::EvalTerm().

◆ getEllipsysVar()

const VariablePtr newlang::getEllipsysVar ( )

Definition at line 1052 of file parser.cpp.

References var_ellipsys.

◆ getNonePair()

const VariablePair & newlang::getNonePair ( )

Definition at line 1056 of file parser.cpp.

References var_none_pair.

Referenced by newlang::Context::FindObject(), and newlang::LatterType::GetVariablePair().

◆ isBaseType()

bool newlang::isBaseType ( ObjType t)
inline

Definition at line 695 of file types.h.

References Bool, Byte, Char, Double, DWord, DWord64, Float32, Float64, Int16, Int32, Int64, Int8, Single, and Word.

◆ isFunction()

bool newlang::isFunction ( ObjType t)
inline

◆ isNative()

bool newlang::isNative ( ObjType t)
inline

Definition at line 710 of file types.h.

References NativeFunc.

Referenced by newlang::Obj::is_native().

◆ isEval()

bool newlang::isEval ( ObjType t)
inline

Definition at line 715 of file types.h.

References BLOCK, and BLOCK_TRY.

Referenced by isContainsType().

◆ isSimpleType()

bool newlang::isSimpleType ( ObjType t)
inline

◆ isIntegralType()

◆ isFloatingType()

◆ isComplexType()

bool newlang::isComplexType ( ObjType t)
inline

Definition at line 737 of file types.h.

References Complex, Complex16, Complex32, and Complex64.

Referenced by newlang::Obj::is_complex(), and isContainsType().

◆ isTensor()

◆ isBooleanType()

bool newlang::isBooleanType ( ObjType t)
inline

Definition at line 747 of file types.h.

References Bool.

Referenced by newlang::Obj::is_bool_type(), and isContainsType().

◆ isArithmeticType()

bool newlang::isArithmeticType ( ObjType t)
inline

Definition at line 752 of file types.h.

References Arithmetic, and Bool.

Referenced by newlang::Obj::BaseTypeConstructor(), and newlang::Obj::is_arithmetic_type().

◆ isStringChar()

◆ isStringWide()

◆ isString()

◆ isInterrupt()

bool newlang::isInterrupt ( ObjType t)
inline

◆ isPlainDataType()

bool newlang::isPlainDataType ( ObjType t)
inline

Definition at line 779 of file types.h.

References Enum, isString(), isTensor(), Struct, and Union.

Referenced by newlang::Obj::is_plain_type(), and isContainsType().

◆ isDictionary()

◆ isClass()

bool newlang::isClass ( ObjType t)
inline

Definition at line 789 of file types.h.

References Class, and Interface.

Referenced by newlang::Obj::is_class_type(), and newlang::Obj::SetValue_().

◆ isEllipsis()

bool newlang::isEllipsis ( ObjType t)
inline

Definition at line 794 of file types.h.

References Ellipsis.

Referenced by newlang::Obj::is_ellipsis().

◆ isRange()

bool newlang::isRange ( ObjType t)
inline

Definition at line 799 of file types.h.

References Range.

Referenced by newlang::Obj::is_range().

◆ isTypeName() [1/2]

◆ isModule()

bool newlang::isModule ( ObjType t)
inline

Definition at line 809 of file types.h.

References Module.

Referenced by isIndexingType().

◆ isIndexingType()

bool newlang::isIndexingType ( ObjType curr,
ObjType fix )
inline

◆ isLocalType()

bool newlang::isLocalType ( ObjType )
inline

Definition at line 819 of file types.h.

Referenced by newlang::Obj::CloneDataTo(), and newlang::Obj::ClonePropTo().

◆ typeFromLimit() [1/2]

◆ typeFromLimit() [2/2]

ObjType newlang::typeFromLimit ( double value,
ObjType type_default = ObjType::Float64 )

Definition at line 3781 of file object.cpp.

References Float32, and Float64.

◆ canCastLimit()

bool newlang::canCastLimit ( const ObjType from,
const ObjType to )
inline

Definition at line 933 of file types.h.

References Any, isDictionary(), isFloatingType(), isFunction(), isSimpleType(), isString(), None, and Rational.

Referenced by canCast(), and newlang::Term::SetType().

◆ canCast() [1/4]

◆ canCast() [2/4]

bool newlang::canCast ( const std::string from,
const std::string to )
inline

Definition at line 990 of file types.h.

References canCast(), and GetBaseTypeFromString().

◆ canCast() [3/4]

bool newlang::canCast ( const TermPtr & from,
const ObjType to )

Definition at line 1087 of file parser.cpp.

References canCast(), and GetBaseTypeFromString().

◆ canCast() [4/4]

bool newlang::canCast ( const TermPtr & from,
const TermPtr & to )

Definition at line 1095 of file parser.cpp.

References canCast(), and GetBaseTypeFromString().

◆ parseInteger()

int64_t newlang::parseInteger ( const char * str)
inline

◆ parseDouble()

double newlang::parseDouble ( const char * str)
inline

◆ parseComplex()

std::complex< double > newlang::parseComplex ( const char * )
inline

Definition at line 1026 of file types.h.

References LOG_RUNTIME.

◆ isReservedName()

bool newlang::isReservedName ( const std::string_view name)
inline

◆ isInternalName()

◆ isMangledName()

bool newlang::isMangledName ( const std::string_view name)
inline

Definition at line 1053 of file types.h.

Referenced by ExtractModuleName(), and isGlobalScope().

◆ isModuleName()

bool newlang::isModuleName ( const std::string_view name)
inline

◆ isStaticName()

bool newlang::isStaticName ( const std::string_view name)
inline

◆ isFieldName()

bool newlang::isFieldName ( const std::string_view name)
inline

Definition at line 1065 of file types.h.

◆ isTrivialName()

bool newlang::isTrivialName ( const std::string_view name)
inline

◆ isLocalName()

◆ isGlobalScope()

bool newlang::isGlobalScope ( const std::string_view name)
inline

◆ isModuleScope()

bool newlang::isModuleScope ( const std::string_view name)
inline

Definition at line 1083 of file types.h.

Referenced by newlang::InternalName::isModuleScope().

◆ isTypeName() [2/2]

bool newlang::isTypeName ( const std::string_view name)
inline

Definition at line 1088 of file types.h.

◆ isFullName()

bool newlang::isFullName ( const std::string_view name)
inline

Definition at line 1092 of file types.h.

Referenced by newlang::InternalName::isFullName().

◆ isMacroName()

bool newlang::isMacroName ( const std::string_view name)
inline

◆ isNativeName()

bool newlang::isNativeName ( const std::string_view name)
inline

◆ isLocalAnyName()

bool newlang::isLocalAnyName ( const std::string_view name)
inline

◆ isSystemName()

◆ isPrivateName()

bool newlang::isPrivateName ( const std::string_view name)
inline

Definition at line 1126 of file types.h.

Referenced by isHidenName(), and newlang::InternalName::isPrivateName().

◆ isHidenName()

bool newlang::isHidenName ( const std::string_view name)
inline

Definition at line 1134 of file types.h.

References isPrivateName().

Referenced by newlang::InternalName::isHidenName().

◆ isVariableName()

bool newlang::isVariableName ( const std::string_view name)
inline

Definition at line 1139 of file types.h.

References isModuleName(), isTypeName(), and LOG_DEBUG.

Referenced by newlang::InternalName::isVariableName().

◆ isConstName()

bool newlang::isConstName ( const std::string_view name)
inline

◆ NormalizeName()

◆ MakeName()

std::string newlang::MakeName ( std::string name)
inline

Definition at line 1180 of file types.h.

Referenced by newlang::JIT::ReplaceObjectInEmbedSource().

◆ ExtractModuleName()

std::string newlang::ExtractModuleName ( const std::string_view name)
inline

◆ CheckCharModuleName()

bool newlang::CheckCharModuleName ( const std::string_view name)
inline

Definition at line 1207 of file types.h.

Referenced by newlang::Parser::CheckModuleTerm().

◆ ExtractName()

std::string newlang::ExtractName ( std::string name)
inline

Definition at line 1223 of file types.h.

References isModuleName().

Referenced by CheckSystemField(), and newlang::InternalName::ExtractName().

◆ isContainsType()

◆ utf8_encode()

std::string newlang::utf8_encode ( const std::wstring wstr)

◆ utf8_decode()

◆ RefTypeFromString()

RefType newlang::RefTypeFromString ( const std::string_view text)
inlineconstexpr

◆ isLiteRef()

bool newlang::isLiteRef ( RefType type)
inlineconstexpr

Definition at line 82 of file variable.h.

References LiteSingle, LiteSingleConst, LiteThread, and LiteThreadConst.

◆ isLiteSyncRef()

bool newlang::isLiteSyncRef ( RefType type)
inlineconstexpr

Definition at line 86 of file variable.h.

References LiteThread, and LiteThreadConst.

Referenced by newlang::AstAnalysis::CheckAssignRef().

◆ isHeavyRef()

bool newlang::isHeavyRef ( RefType type)
inline

Definition at line 90 of file variable.h.

References SyncMono, SyncMonoConst, SyncMulti, and SyncMultiConst.

◆ isConstRef()

bool newlang::isConstRef ( RefType type)
inlineconstexpr

◆ isEditableRef()

bool newlang::isEditableRef ( RefType type)
inlineconstexpr

Definition at line 98 of file variable.h.

References LiteSingle, LiteThread, SyncMono, and SyncMulti.

◆ isValidReference()

bool newlang::isValidReference ( RefType type,
RefType test )
inlineconstexpr

◆ VariableCaseToString()

Variable Documentation

◆ ws

const char* newlang::ws = " \t\n\r\f\v"
staticconstexpr

Definition at line 99 of file types.h.