X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FConsole%2FParse.cci;h=fcbb81f3fb8c89e7b0249fb08cbd455497f49019;hb=731a143df4de38d4c8b0a81121990951971cd858;hp=563cd6ffcbff4b2283440624da984523d32246c5;hpb=958bdb52c39fa39f4ef91cafd9628bcb4f85a03c;p=senf.git diff --git a/Utils/Console/Parse.cci b/Utils/Console/Parse.cci index 563cd6f..fcbb81f 100644 --- a/Utils/Console/Parse.cci +++ b/Utils/Console/Parse.cci @@ -47,6 +47,24 @@ prefix_ senf::console::Token::TokenType senf::console::Token::type() return type_; } +prefix_ unsigned senf::console::Token::line() + const +{ + return line_; +} + +prefix_ unsigned senf::console::Token::column() + const +{ + return column_; +} + +prefix_ unsigned senf::console::Token::index() + const +{ + return index_; +} + prefix_ bool senf::console::Token::is(unsigned tokens) const { @@ -66,11 +84,11 @@ prefix_ bool senf::console::Token::operator!=(Token const & other) } prefix_ senf::console::Token::Token() - : type_(None), token_() + : type_ (None), token_ () {} prefix_ senf::console::Token::Token(TokenType type, std::string token) - : type_(type), token_ (token) + : type_ (type), token_ (token), line_ (0), column_ (0), index_ (0) {} prefix_ senf::console::Token senf::console::NoneToken() @@ -178,7 +196,6 @@ prefix_ bool senf::console::ParseCommandInfo::empty() prefix_ void senf::console::ParseCommandInfo::builtin(BuiltinCommand builtin) { builtin_ = builtin; - commandPath_.clear(); } prefix_ void @@ -186,7 +203,6 @@ senf::console::ParseCommandInfo::command(std::vector & commandPath) { commandPath_.clear(); commandPath_.swap(commandPath); - builtin_ = NoBuiltin; } prefix_ void senf::console::ParseCommandInfo::addToken(Token const & token)