9 #ifndef MLIR_ASMPARSER_CODECOMPLETE_H
10 #define MLIR_ASMPARSER_CODECOMPLETE_H
13 #include "llvm/ADT/StringMap.h"
14 #include "llvm/Support/SourceMgr.h"
45 std::string typeData) = 0;
59 const llvm::StringMap<Attribute> &aliases) = 0;
62 virtual void completeType(
const llvm::StringMap<Type> &aliases) = 0;
70 : codeCompleteLoc(codeCompleteLoc) {}
74 SMLoc codeCompleteLoc;
This class provides an abstract interface into the parser for hooking in code completion events.
virtual void completeExpectedTokens(ArrayRef< StringRef > tokens, bool optional)=0
Signal a completion for the given expected tokens, which are optional if optional is set.
virtual void completeAttribute(const llvm::StringMap< Attribute > &aliases)=0
Signal a completion for an attribute.
AsmParserCodeCompleteContext(SMLoc codeCompleteLoc)
Create a new code completion context with the given code complete location.
SMLoc getCodeCompleteLoc() const
Return the source location used to provide code completion.
virtual void appendBlockCompletion(StringRef name)=0
Append the given block as a code completion result for block name completions.
virtual void appendSSAValueCompletion(StringRef name, std::string typeData)=0
Append the given SSA value as a code completion result for SSA value completions.
virtual void completeDialectAttributeOrAlias(const llvm::StringMap< Attribute > &aliases)=0
virtual void completeType(const llvm::StringMap< Type > &aliases)=0
Signal a completion for a type.
virtual void completeOperationName(StringRef dialectName)=0
Signal code completion for an operation name within the given dialect.
virtual void completeDialectName(StringRef prefix)=0
Signal code completion for a dialect name, with an optional prefix.
virtual void completeDialectTypeOrAlias(const llvm::StringMap< Type > &aliases)=0
void completeDialectName()
virtual ~AsmParserCodeCompleteContext()
@ Type
An inlay hint that for a type annotation.
Include the generated interface declarations.