xo-reader2: support if-then-else expressions. + detailed utest
This commit is contained in:
parent
e243264511
commit
c052c5c509
23 changed files with 1354 additions and 150 deletions
|
|
@ -41,6 +41,34 @@ namespace xo {
|
|||
bool allow_defs() const noexcept { return allow_defs_; }
|
||||
bool cxl_on_rightbrace() const noexcept { return cxl_on_rightbrace_; }
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-expectexpr-methods general methods **/
|
||||
///@{
|
||||
|
||||
/** step state machine for this syntax on incoming boolean literal token @p tkk
|
||||
* with overall parser state in @p p_psm
|
||||
**/
|
||||
void on_bool_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update state for this syntax on incoming f64 token @p tk,
|
||||
* overall parser state in @p p_psm
|
||||
**/
|
||||
void on_f64_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update state for this syntax on incoming i64 token @p tk,
|
||||
* overall parser state in @p p_psm
|
||||
**/
|
||||
void on_i64_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update state for this syntax on incoming string token @p tk,
|
||||
* overall parser state in @p p_psm
|
||||
**/
|
||||
void on_string_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-expectexpr-ssm-facet syntaxstatemachine facet methods **/
|
||||
///@{
|
||||
|
|
@ -89,30 +117,6 @@ namespace xo {
|
|||
void on_singleassign_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update state for this syntax on incoming string token @p tk,
|
||||
* overall parser state in @p p_psm
|
||||
**/
|
||||
void on_string_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update state for this syntax on incoming f64 token @p tk,
|
||||
* overall parser state in @p p_psm
|
||||
**/
|
||||
void on_f64_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update state for this syntax on incoming i64 token @p tk,
|
||||
* overall parser state in @p p_psm
|
||||
**/
|
||||
void on_i64_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update state for this syntax on incoming bool token @p tk,
|
||||
* overall parser state in @p p_psm
|
||||
**/
|
||||
void on_bool_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update state for this syntax on incoming semicolon token @p tk,
|
||||
* overall parser state in @p p_psm
|
||||
**/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue