From 516a1e32ee12f03c5cb927f6ea8230af623a3c17 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Mon, 14 Sep 2026 09:40:12 +0000 Subject: add a bit documentation --- src/lexer/token.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lexer') diff --git a/src/lexer/token.cc b/src/lexer/token.cc index ca0545d..317b456 100644 --- a/src/lexer/token.cc +++ b/src/lexer/token.cc @@ -15,6 +15,10 @@ using namespace std; // remove this namespace ov4 { +/* + * remove leading chars + * by default remove " \t" + */ string T_lexer::trim(const string &s, const string &trim_target) // trim_target = " \t" { size_t b = s.find_first_not_of(trim_target); @@ -55,7 +59,9 @@ void T_lexer::bracket_depth_changer(char c, int &bracket_depth) } } - +/* + * determine whether `s` and `next` can be combined to form a token + */ bool T_lexer::token_continue(const string &s, char next) { loggerln("token_continue: receiving {} {}", s, next); -- cgit v1.3.1-4-g156e