libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::Print::Printf::Compiler< Source > Class Template Reference

Compile-time printf frontend that parses and lowers one source string. More...

#include <printf_frontend_detail.hpp>

Public Types

using ErrorType = Printf::Error
 

Static Public Member Functions

static constexpr const char * SourceData ()
 Returns the underlying source bytes without the terminating zero byte. / 返回去掉结尾零字节后的源字符串数据
 
static constexpr size_t SourceSize ()
 Returns the source length without the terminating zero byte. / 返回去掉结尾零字节后的源字符串长度
 
static consteval ErrorType Walk (auto &visitor)
 Walks normalized text spans and value fields in source order. / 按源串顺序遍历归一化后的文本片段和字段
 

Detailed Description

template<Text Source>
class LibXR::Print::Printf::Compiler< Source >

Compile-time printf frontend that parses and lowers one source string.

单个 printf 源字符串的编译期前端,负责解析并降为共享格式语义。

Definition at line 1070 of file printf_frontend_detail.hpp.

Member Typedef Documentation

◆ ErrorType

template<Text Source>
using LibXR::Print::Printf::Compiler< Source >::ErrorType = Printf::Error

Definition at line 1073 of file printf_frontend_detail.hpp.

Member Function Documentation

◆ SourceData()

template<Text Source>
static constexpr const char * LibXR::Print::Printf::Compiler< Source >::SourceData ( )
inlinestaticnodiscardconstexpr

Returns the underlying source bytes without the terminating zero byte. / 返回去掉结尾零字节后的源字符串数据

Definition at line 1076 of file printf_frontend_detail.hpp.

1076{ return Source.Data(); }

◆ SourceSize()

template<Text Source>
static constexpr size_t LibXR::Print::Printf::Compiler< Source >::SourceSize ( )
inlinestaticnodiscardconstexpr

Returns the source length without the terminating zero byte. / 返回去掉结尾零字节后的源字符串长度

Definition at line 1078 of file printf_frontend_detail.hpp.

1078{ return Source.Size(); }

◆ Walk()

template<Text Source>
static consteval ErrorType LibXR::Print::Printf::Compiler< Source >::Walk ( auto & visitor)
inlinestaticnodiscardconsteval

Walks normalized text spans and value fields in source order. / 按源串顺序遍历归一化后的文本片段和字段

Definition at line 1081 of file printf_frontend_detail.hpp.

1082 {
1083 return Detail::PrintfCompile::WalkAndLower<Source>(visitor);
1084 }

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