WPILibC++ 2024.3.2
wpi::structparser::Token Struct Reference

A lexed raw struct schema token. More...

#include <wpi/struct/SchemaParser.h>

Public Types

enum  Kind {
  kUnknown , kInteger , kIdentifier , kLeftBracket ,
  kRightBracket , kLeftBrace , kRightBrace , kColon ,
  kSemicolon , kComma , kEquals , kEndOfInput
}
 A lexed raw struct schema token kind. More...
 

Public Member Functions

 Token ()=default
 
 Token (Kind kind, std::string_view text)
 
bool Is (Kind k) const
 

Public Attributes

Kind kind = kUnknown
 
std::string_view text
 

Detailed Description

A lexed raw struct schema token.

Member Enumeration Documentation

◆ Kind

A lexed raw struct schema token kind.

Enumerator
kUnknown 

Unknown.

kInteger 

Integer.

kIdentifier 

Identifier.

kLeftBracket 

Left square bracket.

kRightBracket 

Right square bracket.

kLeftBrace 

Left curly brace.

kRightBrace 

Right curly brace.

kColon 

Colon.

kSemicolon 

Semicolon.

kComma 

Comma.

kEquals 

Equals.

kEndOfInput 

End of input.

Constructor & Destructor Documentation

◆ Token() [1/2]

wpi::structparser::Token::Token ( )
default

◆ Token() [2/2]

wpi::structparser::Token::Token ( Kind  kind,
std::string_view  text 
)
inline

Member Function Documentation

◆ Is()

bool wpi::structparser::Token::Is ( Kind  k) const
inline

Member Data Documentation

◆ kind

Kind wpi::structparser::Token::kind = kUnknown

◆ text

std::string_view wpi::structparser::Token::text

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