btool
A parser/converter/transpiler for .bib files
GlobalParserState.cpp
Go to the documentation of this file.
1
#include <
GlobalParserState.hpp
>
2
#include <
AbstractParserState.hpp
>
3
9
GlobalParserState::GlobalParserState
(
ParserContext
&context, std::vector<BibElement> &result) noexcept
10
:
AbstractParserState
{context, result} {}
11
18
ParserState
*
GlobalParserState::handleCharacter
(
const
char
c) {
19
if
(c ==
'@'
) {
20
auto
const
nextState =
new
StyleParserState
{
context
,
result
};
21
delete
this
;
22
return
nextState;
23
}
else
{
24
return
this
;
25
}
26
}
GlobalParserState.hpp
ParserState
Definition:
ParserState.hpp:7
GlobalParserState::handleCharacter
auto handleCharacter(char c) -> ParserState *override
Definition:
GlobalParserState.cpp:18
AbstractParserState
Definition:
AbstractParserState.hpp:13
ParserContext
Definition:
ParserContext.hpp:10
AbstractParserState::context
ParserContext & context
Context of the State.
Definition:
AbstractParserState.hpp:15
GlobalParserState::GlobalParserState
GlobalParserState(ParserContext &context, std::vector< BibElement > &result) noexcept
Definition:
GlobalParserState.cpp:9
AbstractParserState.hpp
AbstractParserState::result
std::vector< BibElement > & result
Container for accumulating Parsing-Results.
Definition:
AbstractParserState.hpp:16
StyleParserState
Style Parser State.
Definition:
StyleParserState.hpp:14
src
GlobalParserState.cpp
Generated by
1.8.19