ONE - On-device Neural Engine
Loading...
Searching...
No Matches
flatbuffers::ParserState Struct Reference

#include <idl.h>

Public Member Functions

 ParserState ()
 

Protected Member Functions

void ResetState (const char *source)
 
void MarkNewLine ()
 
int64_t CursorPosition () const
 

Protected Attributes

const char * prev_cursor_
 
const char * cursor_
 
const char * line_start_
 
int line_
 
int token_
 
bool attr_is_trivial_ascii_string_
 
std::string attribute_
 
std::vector< std::string > doc_comment_
 

Detailed Description

Definition at line 828 of file idl.h.

Constructor & Destructor Documentation

◆ ParserState()

flatbuffers::ParserState::ParserState ( )
inline

Definition at line 829 of file idl.h.

830 : prev_cursor_(nullptr),
831 cursor_(nullptr),
832 line_start_(nullptr),
833 line_(0),
834 token_(-1),
const char * cursor_
Definition idl.h:856
const char * prev_cursor_
Definition idl.h:855
const char * line_start_
Definition idl.h:857
bool attr_is_trivial_ascii_string_
Definition idl.h:864

Member Function Documentation

◆ CursorPosition()

int64_t flatbuffers::ParserState::CursorPosition ( ) const
inlineprotected

Definition at line 850 of file idl.h.

850 {
852 return static_cast<int64_t>(cursor_ - line_start_);
853 }
#define FLATBUFFERS_ASSERT
Definition base.h:21

References cursor_, FLATBUFFERS_ASSERT, and line_start_.

◆ MarkNewLine()

void flatbuffers::ParserState::MarkNewLine ( )
inlineprotected

Definition at line 845 of file idl.h.

845 {
847 line_ += 1;
848 }

References cursor_, line_, and line_start_.

Referenced by ResetState().

◆ ResetState()

void flatbuffers::ParserState::ResetState ( const char *  source)
inlineprotected

Definition at line 838 of file idl.h.

838 {
839 prev_cursor_ = source;
840 cursor_ = source;
841 line_ = 0;
842 MarkNewLine();
843 }

References cursor_, line_, MarkNewLine(), and prev_cursor_.

Field Documentation

◆ attr_is_trivial_ascii_string_

bool flatbuffers::ParserState::attr_is_trivial_ascii_string_
protected

Definition at line 864 of file idl.h.

◆ attribute_

std::string flatbuffers::ParserState::attribute_
protected

Definition at line 865 of file idl.h.

◆ cursor_

const char* flatbuffers::ParserState::cursor_
protected

Definition at line 856 of file idl.h.

Referenced by CursorPosition(), MarkNewLine(), and ResetState().

◆ doc_comment_

std::vector<std::string> flatbuffers::ParserState::doc_comment_
protected

Definition at line 866 of file idl.h.

◆ line_

int flatbuffers::ParserState::line_
protected

Definition at line 858 of file idl.h.

Referenced by MarkNewLine(), and ResetState().

◆ line_start_

const char* flatbuffers::ParserState::line_start_
protected

Definition at line 857 of file idl.h.

Referenced by CursorPosition(), and MarkNewLine().

◆ prev_cursor_

const char* flatbuffers::ParserState::prev_cursor_
protected

Definition at line 855 of file idl.h.

Referenced by ResetState().

◆ token_

int flatbuffers::ParserState::token_
protected

Definition at line 859 of file idl.h.


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