MLIR 22.0.0git
mlir::detail::ParserState Struct Reference

This class refers to all of the state maintained globally by the parser, such as the current lexer position etc. More...

#include "AsmParser/ParserState.h"

Public Member Functions

 ParserState (const llvm::SourceMgr &sourceMgr, const ParserConfig &config, SymbolState &symbols, AsmParserState *asmState, AsmParserCodeCompleteContext *codeCompleteContext)
 ParserState (const ParserState &)=delete
void operator= (const ParserState &)=delete

Public Attributes

const ParserConfigconfig
 The configuration used to setup the parser.
Lexer lex
 The lexer for the source file we're parsing.
Token curToken
 This is the next token that hasn't been consumed yet.
Token lastToken
 This is the last token that has been consumed.
SymbolStatesymbols
 The current state for symbol parsing.
SetVector< const void * > cyclicParsingStack
 Stack of potentially cyclic mutable attributes or type currently being parsed.
AsmParserStateasmState
 An optional pointer to a struct containing high level parser state to be populated during parsing.
AsmParserCodeCompleteContextcodeCompleteContext
 An optional code completion context.
SmallVector< StringRef > defaultDialectStack {"builtin"}

Detailed Description

This class refers to all of the state maintained globally by the parser, such as the current lexer position etc.

Definition at line 51 of file ParserState.h.

Constructor & Destructor Documentation

◆ ParserState() [1/2]

mlir::detail::ParserState::ParserState ( const llvm::SourceMgr & sourceMgr,
const ParserConfig & config,
SymbolState & symbols,
AsmParserState * asmState,
AsmParserCodeCompleteContext * codeCompleteContext )
inline

Definition at line 52 of file ParserState.h.

References asmState, codeCompleteContext, config, curToken, getContext(), lastToken, lex, and symbols.

Referenced by operator=(), and ParserState().

◆ ParserState() [2/2]

mlir::detail::ParserState::ParserState ( const ParserState & )
delete

References ParserState().

Member Function Documentation

◆ operator=()

void mlir::detail::ParserState::operator= ( const ParserState & )
delete

References ParserState().

Member Data Documentation

◆ asmState

AsmParserState* mlir::detail::ParserState::asmState

An optional pointer to a struct containing high level parser state to be populated during parsing.

Definition at line 83 of file ParserState.h.

Referenced by ParserState().

◆ codeCompleteContext

AsmParserCodeCompleteContext* mlir::detail::ParserState::codeCompleteContext

An optional code completion context.

Definition at line 86 of file ParserState.h.

Referenced by ParserState().

◆ config

const ParserConfig& mlir::detail::ParserState::config

The configuration used to setup the parser.

Definition at line 63 of file ParserState.h.

Referenced by ParserState().

◆ curToken

Token mlir::detail::ParserState::curToken

This is the next token that hasn't been consumed yet.

Definition at line 69 of file ParserState.h.

Referenced by ParserState().

◆ cyclicParsingStack

SetVector<const void *> mlir::detail::ParserState::cyclicParsingStack

Stack of potentially cyclic mutable attributes or type currently being parsed.

Definition at line 79 of file ParserState.h.

◆ defaultDialectStack

SmallVector<StringRef> mlir::detail::ParserState::defaultDialectStack {"builtin"}

Definition at line 93 of file ParserState.h.

◆ lastToken

Token mlir::detail::ParserState::lastToken

This is the last token that has been consumed.

Definition at line 72 of file ParserState.h.

Referenced by ParserState().

◆ lex

Lexer mlir::detail::ParserState::lex

The lexer for the source file we're parsing.

Definition at line 66 of file ParserState.h.

Referenced by ParserState().

◆ symbols

SymbolState& mlir::detail::ParserState::symbols

The current state for symbol parsing.

Definition at line 75 of file ParserState.h.

Referenced by mlir::detail::Parser::parseResourceHandle(), and ParserState().


The documentation for this struct was generated from the following file: