teditor
1.8.0@@fee5e94
Terminal based editor written in C++
|
Go to the documentation of this file.
5 #include <unordered_map>
15 typedef std::unordered_map<std::string, Num64>
VarMap;
25 Num64 computeUnaryFunc(
const Num64& a,
const std::string& func);
26 bool isBinaryOp(uint32_t
id);
27 bool isUnaryFunc(uint32_t
id);
TimePoint end
Definition: todo/objects.h:23
@ Space
Definition: ledger/parser.cpp:20
void evaluate(const std::string &expr, VarMap &vars)
Definition: calc/parser.cpp:57
Accounts topAccounts(bool sort=true) const
Computes balances of only the top-level accounts. Top-level account is the account name that preceeds...
Definition: ledger/parser.cpp:134
TimePoint start
Definition: todo/objects.h:21
static const std::string Integer
integer
Definition: regexs.h:13
virtual void load(const std::string &file, int line=0)
Definition: buffer.cpp:333
RepeatType
Definition: todo/objects.h:10
Strings split(const std::string &str, char delim)
Definition: utils.cpp:48
static const std::string Newline
newline (windows as well as unix)
Definition: regexs.h:16
Tokens
Definition: ledger/parser.cpp:14
@ Plus
Definition: calc/parser.cpp:19
parser::Lexer & getLexer()
Definition: calc/parser.cpp:29
bool hasStart
Definition: todo/objects.h:22
std::unordered_map< std::string, Num64 > VarMap
Definition: extensions/calc/mode.h:9
T sq(T in)
Definition: number.h:9
@ IVal
Definition: calc/parser.cpp:13
Definition: ledger/objects.h:18
std::string description
Definition: todo/objects.h:26
@ FVal
Definition: calc/parser.cpp:14
Core number used for computing in the calculator.
Definition: number.h:76
bool isEof() const
Definition: parse_tree.h:25
Number< I, F > toFloat(const Number< I, F > &a)
Definition: number.h:256
T cube(T in)
Definition: number.h:10
@ SemiColon
Definition: calc/parser.cpp:26
uint32_t type
Definition: parse_tree.h:19
@ Date
Definition: todo/parser.cpp:18
@ AccountDescription
Definition: ledger/parser.cpp:22
parser::Lexer & getLexer()
Definition: todo/parser.cpp:25
Tokens
Definition: todo/parser.cpp:15
void minmaxDates(TimePoint &min, TimePoint &max) const
Definition: ledger/parser.cpp:177
double str2double(const std::string &str)
Definition: utils.cpp:87
@ Mul
Definition: calc/parser.cpp:21
@ Keywords
Definition: todo/parser.cpp:17
@ Date
Definition: ledger/parser.cpp:17
@ Space
Definition: todo/parser.cpp:22
Number< I, F > toInt(const Number< I, F > &a)
Definition: number.h:254
std::string join(const Strings &s, char delim, int start, int end)
Definition: utils.cpp:56
@ Div
Definition: calc/parser.cpp:22
RepeatType strToRepeatType(const std::string &str)
Definition: objects.cpp:11
Point end
Definition: parse_tree.h:23
static const std::string DateTime
date/time regex
Definition: regexs.h:19
@ String
Definition: todo/parser.cpp:19
@ Space
Definition: calc/parser.cpp:25
void reload()
Definition: ledger/parser.cpp:128
@ Newline
Definition: ledger/parser.cpp:19
Definition: parse_tree.h:13
@ Equals
Definition: calc/parser.cpp:18
static const uint32_t Unknown
Definition: parse_tree.h:30
static const uint32_t End
Definition: parse_tree.h:28
#define ASSERT(check, fmt,...)
Macro to assert with runtime_error exception if the check fails.
Definition: utils.h:35
Account & find(const std::string &a)
Definition: ledger/objects.h:54
std::stack< Num64 > NumStack
Definition: calc/parser.h:16
void clear()
Definition: objects.cpp:31
bool isAbs(const std::string &file)
Definition: file_utils.cpp:116
std::chrono::system_clock::time_point TimePoint
Definition: time_utils.h:7
Definition: calc/parser.h:19
static const std::string FloatingPt
floating point number
Definition: regexs.h:12
RepeatType repeat
Definition: todo/objects.h:25
parser::Lexer & getLexer()
Definition: ledger/parser.cpp:26
Definition: ledger/objects.h:52
@ BrktClose
Definition: calc/parser.cpp:16
TimePoint timeFromStr(const std::string &dt)
Definition: time_utils.cpp:50
Accounts allAccounts(bool sort=true) const
Computes balances of the top-level accounts as well as all accounts.
Definition: ledger/parser.cpp:149
std::string rel2abs(const std::string &pwd, const std::string &rel)
Definition: file_utils.cpp:118
@ Var
Definition: calc/parser.cpp:17
Tokens
Definition: calc/parser.cpp:12
@ Exp
Definition: calc/parser.cpp:23
@ Newline
Definition: todo/parser.cpp:21
@ Name
Definition: ledger/parser.cpp:16
std::set< std::string > Aliases
Definition: ledger/objects.h:15
@ Comment
Definition: ledger/parser.cpp:15
int64_t rawBalance() const
Definition: ledger/objects.h:31
VarMap & vars()
Definition: extensions/calc/mode.cpp:11
@ Comment
Definition: todo/parser.cpp:16
@ Func
Definition: calc/parser.cpp:24
static const std::string Variable
variable names in a program
Definition: regexs.h:15
@ Minus
Definition: calc/parser.cpp:20
bool hasEnd
Definition: todo/objects.h:24
std::string getpwd()
Definition: file_utils.cpp:107
@ BrktOpen
Definition: calc/parser.cpp:15
@ Number
Definition: ledger/parser.cpp:18
@ AccountAlias
Definition: ledger/parser.cpp:23
Number< int64_t, double > Num64
Definition: number.h:272
Point start
Definition: parse_tree.h:21
@ AccountStart
Definition: ledger/parser.cpp:21
Parser(const std::string &f)
Definition: ledger/parser.cpp:42