#pragma once #include #include #include namespace PashaBibko::LXC::Parser { struct ParserError {}; struct FunctionAST { FunctionAST() : name{}, contents{}, funcParams{} {} FunctionAST(const FunctionAST& other) = delete; FunctionAST(FunctionAST&& other) noexcept : name(std::move(other.name)), contents(std::move(other.contents)), funcParams(std::move(other.funcParams)) {} std::string name; std::vector> funcParams; AST::SyntaxBranch contents; std::string LogStr() const { std::ostringstream os; os << name << " ("; for (size_t i = 0; i < funcParams.size(); i++) { os << funcParams[i].first << ' ' << funcParams[i].second; if (i != funcParams.size() - 1) os << ", "; } os << ")"; return os.str(); } }; Util::ReturnVal, ParserError> TurnTokensIntoAST(const Lexer::LexerOutput& input); }