SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
sourcepp::parser::text::Tokenizer Class Reference

#include <Text.h>

Collaboration diagram for sourcepp::parser::text::Tokenizer:

Classes

class  Result

Public Member Functions

 Tokenizer ()=default
Tokenizer & setSingleLineCommentStart (std::string_view singleLineCommentStart_)
Tokenizer & setMultiLineCommentStart (std::string_view multiLineCommentStart_)
Tokenizer & setMultiLineCommentEnd (std::string_view multiLineCommentEnd_)
Tokenizer & setEscapeSequences (const EscapeSequenceMap &escapeSequences_)
Result parse (std::string_view text, std::string &backingString) const

Protected Attributes

std::string_view singleLineCommentStart = DEFAULT_SINGLE_LINE_COMMENT_START
std::string_view multiLineCommentStart = DEFAULT_MULTI_LINE_COMMENT_START
std::string_view multiLineCommentEnd = DEFAULT_MULTI_LINE_COMMENT_END
EscapeSequenceMap escapeSequences = getDefaultEscapeSequences()

Detailed Description

Definition at line 25 of file Text.h.

Constructor & Destructor Documentation

◆ Tokenizer()

sourcepp::parser::text::Tokenizer::Tokenizer ( )
default

Member Function Documentation

◆ parse()

parser::text::Tokenizer::Result parser::text::Tokenizer::parse ( std::string_view text,
std::string & backingString ) const
nodiscard

Definition at line 90 of file Text.cpp.

◆ setEscapeSequences()

parser::text::Tokenizer & parser::text::Tokenizer::setEscapeSequences ( const EscapeSequenceMap & escapeSequences_)

Definition at line 85 of file Text.cpp.

◆ setMultiLineCommentEnd()

parser::text::Tokenizer & parser::text::Tokenizer::setMultiLineCommentEnd ( std::string_view multiLineCommentEnd_)

Definition at line 75 of file Text.cpp.

◆ setMultiLineCommentStart()

parser::text::Tokenizer & parser::text::Tokenizer::setMultiLineCommentStart ( std::string_view multiLineCommentStart_)

Definition at line 70 of file Text.cpp.

◆ setSingleLineCommentStart()

parser::text::Tokenizer & parser::text::Tokenizer::setSingleLineCommentStart ( std::string_view singleLineCommentStart_)

Definition at line 65 of file Text.cpp.

Member Data Documentation

◆ escapeSequences

EscapeSequenceMap sourcepp::parser::text::Tokenizer::escapeSequences = getDefaultEscapeSequences()
protected

Definition at line 100 of file Text.h.

◆ multiLineCommentEnd

std::string_view sourcepp::parser::text::Tokenizer::multiLineCommentEnd = DEFAULT_MULTI_LINE_COMMENT_END
protected

Definition at line 97 of file Text.h.

◆ multiLineCommentStart

std::string_view sourcepp::parser::text::Tokenizer::multiLineCommentStart = DEFAULT_MULTI_LINE_COMMENT_START
protected

Definition at line 96 of file Text.h.

◆ singleLineCommentStart

std::string_view sourcepp::parser::text::Tokenizer::singleLineCommentStart = DEFAULT_SINGLE_LINE_COMMENT_START
protected

Definition at line 95 of file Text.h.


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