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

#include <syntax_highlighter.hpp>

Public Member Functions

std::string apply (std::string_view str) const
 

Public Attributes

fmt::text_style style
 Style for the token kind.
 
std::function< fmt::text_style(std::string_view)> style_fn
 Function to call to determine the style for a token kind with a specific string. May be null. Overrides style.
 
std::function< std::string(std::string_view)> transform_fn
 Function to call to transform a token string. May be null.
 

Member Function Documentation

◆ apply()

std::string asmgrader::highlight::Options::Opt::apply ( std::string_view str) const

Member Data Documentation

◆ style

fmt::text_style asmgrader::highlight::Options::Opt::style

Style for the token kind.

◆ style_fn

std::function<fmt::text_style(std::string_view)> asmgrader::highlight::Options::Opt::style_fn

Function to call to determine the style for a token kind with a specific string. May be null. Overrides style.

◆ transform_fn

std::function<std::string(std::string_view)> asmgrader::highlight::Options::Opt::transform_fn

Function to call to transform a token string. May be null.


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