Revision 88663a6815cb411b0c81e6c28e7f1c7643659c30 authored by Yong He on 06 October 2022, 22:16:45 UTC, committed by GitHub on 06 October 2022, 22:16:45 UTC
* Add syntax for multi-level break.

* Fix.

* Fix.

Co-authored-by: Yong He <yhe@nvidia.com>
1 parent 50a6906
Raw File
slang-language-server-semantic-tokens.h
#pragma once

#include "../../slang.h"
#include "../core/slang-basic.h"
#include "slang-ast-all.h"
#include "slang-syntax.h"
#include "slang-compiler.h"
#include "slang-workspace-version.h"

namespace Slang
{
enum class SemanticTokenType
{
    Type, EnumMember, Variable, Parameter, Function, Property, Namespace, Keyword, Macro, NormalText
};
extern const char* kSemanticTokenTypes[(int)SemanticTokenType::NormalText];

struct SemanticToken
{
    int line;
    int col;
    int length;
    SemanticTokenType type;
    bool operator<(const SemanticToken& other) const
    {
        if (line < other.line)
            return true;
        if (line == other.line)
            return col < other.col;
        return false;
    }
};
List<SemanticToken> getSemanticTokens(
    Linkage* linkage, Module* module, UnownedStringSlice fileName, DocumentVersion* doc);
List<uint32_t> getEncodedTokens(List<SemanticToken>& tokens);

} // namespace Slang
back to top