AsmGrader 0.0.0
Loading...
Searching...
No Matches
asmgrader::highlight::Options Struct Reference

#include <syntax_highlighter.hpp>

Classes

struct  Opt
 

Public Member Functions

constexpr Optoperator[] (std::size_t idx)
 
constexpr Optoperator[] (inspection::Token::Kind kind)
 
constexpr const Optoperator[] (std::size_t idx) const
 
constexpr const Optoperator[] (inspection::Token::Kind kind) const
 

Static Public Member Functions

static fmt::text_style style_basic_ident_types (fmt::text_style type_style, fmt::text_style default_style, std::string_view ident)
 Custom styling functions for identifiers that are types (e.g., void, int, etc.)
 
static fmt::text_style style_op_keywords (fmt::text_style keyword_style, fmt::text_style default_style, std::string_view op)
 
static std::string basic_binary_op_spacing (std::string_view op)
 Add spacing for binary ops.
 
static std::string basic_op_spacing (std::string_view op)
 
static Options get_default_options ()
 

Public Attributes

std::array< Opt, num_token_kindstoken_opts {}
 Each index is representative of the highlighting option for the token kind enumerator with a value == index. e.g., token_opts[0] is the option for StringLiteral.
 

Static Public Attributes

static constexpr auto num_token_kinds = static_cast<std::size_t>(EndDelimiter)
 

Member Function Documentation

◆ basic_binary_op_spacing()

std::string asmgrader::highlight::Options::basic_binary_op_spacing ( std::string_view op)
static

Add spacing for binary ops.

◆ basic_op_spacing()

std::string asmgrader::highlight::Options::basic_op_spacing ( std::string_view op)
static

◆ get_default_options()

Options asmgrader::highlight::Options::get_default_options ( )
static

◆ operator[]() [1/4]

Opt & asmgrader::highlight::Options::operator[] ( inspection::Token::Kind kind)
inlineconstexpr

◆ operator[]() [2/4]

const Opt & asmgrader::highlight::Options::operator[] ( inspection::Token::Kind kind) const
inlineconstexpr

◆ operator[]() [3/4]

Opt & asmgrader::highlight::Options::operator[] ( std::size_t idx)
inlineconstexpr

◆ operator[]() [4/4]

const Opt & asmgrader::highlight::Options::operator[] ( std::size_t idx) const
inlineconstexpr

◆ style_basic_ident_types()

fmt::text_style asmgrader::highlight::Options::style_basic_ident_types ( fmt::text_style type_style,
fmt::text_style default_style,
std::string_view ident )
static

Custom styling functions for identifiers that are types (e.g., void, int, etc.)

◆ style_op_keywords()

fmt::text_style asmgrader::highlight::Options::style_op_keywords ( fmt::text_style keyword_style,
fmt::text_style default_style,
std::string_view op )
static

Member Data Documentation

◆ num_token_kinds

auto asmgrader::highlight::Options::num_token_kinds = static_cast<std::size_t>(EndDelimiter)
staticconstexpr

◆ token_opts

std::array<Opt, num_token_kinds> asmgrader::highlight::Options::token_opts {}

Each index is representative of the highlighting option for the token kind enumerator with a value == index. e.g., token_opts[0] is the option for StringLiteral.


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