MLIR  20.0.0git
Public Member Functions | Protected Member Functions | List of all members
mlir::pdll::CodeCompleteContext Class Reference

This class provides an abstract interface into the parser for hooking in code completion events. More...

#include "mlir/Tools/PDLL/Parser/CodeComplete.h"

Public Member Functions

virtual ~CodeCompleteContext ()
 
SMLoc getCodeCompleteLoc () const
 Return the location used to provide code completion. More...
 
virtual void codeCompleteTupleMemberAccess (ast::TupleType tupleType)
 Signal code completion for a member access into the given tuple type. More...
 
virtual void codeCompleteOperationMemberAccess (ast::OperationType opType)
 Signal code completion for a member access into the given operation type. More...
 
virtual void codeCompleteOperationAttributeName (StringRef opName)
 Signal code completion for a member access into the given operation type. More...
 
virtual void codeCompleteConstraintName (ast::Type currentType, bool allowInlineTypeConstraints, const ast::DeclScope *scope)
 Signal code completion for a constraint name with an optional decl scope. More...
 
virtual void codeCompleteDialectName ()
 Signal code completion for a dialect name. More...
 
virtual void codeCompleteOperationName (StringRef dialectName)
 Signal code completion for an operation name in the given dialect. More...
 
virtual void codeCompletePatternMetadata ()
 Signal code completion for Pattern metadata. More...
 
virtual void codeCompleteIncludeFilename (StringRef curPath)
 Signal code completion for an include filename. More...
 
virtual void codeCompleteCallSignature (const ast::CallableDecl *callable, unsigned currentNumArgs)
 Signal code completion for the signature of a callable. More...
 
virtual void codeCompleteOperationOperandsSignature (std::optional< StringRef > opName, unsigned currentNumOperands)
 Signal code completion for the signature of an operation's operands. More...
 
virtual void codeCompleteOperationResultsSignature (std::optional< StringRef > opName, unsigned currentNumResults)
 Signal code completion for the signature of an operation's results. More...
 

Protected Member Functions

 CodeCompleteContext (SMLoc codeCompleteLoc)
 Create a new code completion context with the given code complete location. More...
 

Detailed Description

This class provides an abstract interface into the parser for hooking in code completion events.

Definition at line 30 of file CodeComplete.h.

Constructor & Destructor Documentation

◆ ~CodeCompleteContext()

CodeCompleteContext::~CodeCompleteContext ( )
virtualdefault

◆ CodeCompleteContext()

mlir::pdll::CodeCompleteContext::CodeCompleteContext ( SMLoc  codeCompleteLoc)
inlineexplicitprotected

Create a new code completion context with the given code complete location.

Definition at line 91 of file CodeComplete.h.

Member Function Documentation

◆ codeCompleteCallSignature()

virtual void mlir::pdll::CodeCompleteContext::codeCompleteCallSignature ( const ast::CallableDecl callable,
unsigned  currentNumArgs 
)
inlinevirtual

Signal code completion for the signature of a callable.

Definition at line 75 of file CodeComplete.h.

◆ codeCompleteConstraintName()

void CodeCompleteContext::codeCompleteConstraintName ( ast::Type  currentType,
bool  allowInlineTypeConstraints,
const ast::DeclScope scope 
)
virtual

Signal code completion for a constraint name with an optional decl scope.

currentType is the current type of the variable that will use the constraint, or nullptr if a type is unknown. allowInlineTypeConstraints enables inline type constraints for Attr/Value/ValueRange.

Definition at line 26 of file CodeComplete.cpp.

◆ codeCompleteDialectName()

virtual void mlir::pdll::CodeCompleteContext::codeCompleteDialectName ( )
inlinevirtual

Signal code completion for a dialect name.

Definition at line 59 of file CodeComplete.h.

◆ codeCompleteIncludeFilename()

virtual void mlir::pdll::CodeCompleteContext::codeCompleteIncludeFilename ( StringRef  curPath)
inlinevirtual

Signal code completion for an include filename.

Definition at line 68 of file CodeComplete.h.

◆ codeCompleteOperationAttributeName()

virtual void mlir::pdll::CodeCompleteContext::codeCompleteOperationAttributeName ( StringRef  opName)
inlinevirtual

Signal code completion for a member access into the given operation type.

Definition at line 48 of file CodeComplete.h.

◆ codeCompleteOperationMemberAccess()

void CodeCompleteContext::codeCompleteOperationMemberAccess ( ast::OperationType  opType)
virtual

Signal code completion for a member access into the given operation type.

Definition at line 23 of file CodeComplete.cpp.

◆ codeCompleteOperationName()

virtual void mlir::pdll::CodeCompleteContext::codeCompleteOperationName ( StringRef  dialectName)
inlinevirtual

Signal code completion for an operation name in the given dialect.

Definition at line 62 of file CodeComplete.h.

◆ codeCompleteOperationOperandsSignature()

virtual void mlir::pdll::CodeCompleteContext::codeCompleteOperationOperandsSignature ( std::optional< StringRef >  opName,
unsigned  currentNumOperands 
)
inlinevirtual

Signal code completion for the signature of an operation's operands.

Definition at line 80 of file CodeComplete.h.

◆ codeCompleteOperationResultsSignature()

virtual void mlir::pdll::CodeCompleteContext::codeCompleteOperationResultsSignature ( std::optional< StringRef >  opName,
unsigned  currentNumResults 
)
inlinevirtual

Signal code completion for the signature of an operation's results.

Definition at line 85 of file CodeComplete.h.

◆ codeCompletePatternMetadata()

virtual void mlir::pdll::CodeCompleteContext::codeCompletePatternMetadata ( )
inlinevirtual

Signal code completion for Pattern metadata.

Definition at line 65 of file CodeComplete.h.

◆ codeCompleteTupleMemberAccess()

void CodeCompleteContext::codeCompleteTupleMemberAccess ( ast::TupleType  tupleType)
virtual

Signal code completion for a member access into the given tuple type.

Definition at line 21 of file CodeComplete.cpp.

◆ getCodeCompleteLoc()

SMLoc mlir::pdll::CodeCompleteContext::getCodeCompleteLoc ( ) const
inline

Return the location used to provide code completion.

Definition at line 35 of file CodeComplete.h.

Referenced by mlir::pdll::Lexer::Lexer().


The documentation for this class was generated from the following files: