#pragma once
#include <string>
#include <optional>
#include "../../protocol/protocol.hpp"

namespace lsp::language::keyword
{
    enum class Kind
    {
        kProgramStructure, // program, function, procedure, unit, uses, implementation, interface, initialization, finalization
        kDataTypes, // string, integer, boolean, int64, real, array
        kClassTypes, // type, class, fakeclass, new
        kClassModifiers, // override, overload, virtual, property, self, inherited
        kAccessModifiers, // public, protected, private, published
        kPropertyAccessors, // read, write
        kConstructors, // create, destroy, operator
        kVariableModifiers, // external, const, out, var, global, static
        kConditionals, // if, else, then, case, of
        kLoops, // for, while, do, downto, step, until, repeat, to
        kBranchControl, // break, continue, goto, label, exit
        kReturnControl, // return, debugreturn, debugrunenv, debugrunenvdo
        kBlockControl, // begin, end, with
        kReferences, // weakref, autoref
        kNamespace, // namespace
        kExceptions, // except, raise, try, finally, exceptobject
        kLogicalOperators, // and, in, is, not, or
        kArithmeticOperators, // div, mod
        kBitwiseOperators, // ror, rol, shr, shl
        kSetOperators, // union, minus, union2
        kSqlControl, // select, vselect, sselect, update, delete, mselect
        kSqlOperators, // on, like, in (SQL context)
        kSqlKeywords, // sqlin, from, where, group, by, order, distinct, join
        kCallingConventions, // cdecl, pascal, stdcall, safecall, fastcall, register
        kSystemKeywords, // setuid, sudo
        kBuiltinVariables, // paramcount, realparamcount, params, system, tslassigning, likeeps, likeepsrate
        kBuiltinFunctions, // echo, mtic, mtoc
        kBooleanConstants, // false, true
        kMathConstants, // inf, nan
        kNullConstants // nil
    };

    struct Info
    {
        std::string keyword;
        Kind category;
        std::string description;
    };

}
