xo-reader2: #q supports literal dictionaries
This commit is contained in:
parent
90c4819ef9
commit
25fd378c78
19 changed files with 919 additions and 57 deletions
|
|
@ -88,6 +88,10 @@ set(SELF_SRCS
|
|||
ISyntaxStateMachine_DExpectQArraySsm.cpp
|
||||
IPrintable_DExpectQArraySsm.cpp
|
||||
|
||||
DExpectQDictSsm.cpp
|
||||
facet/ISyntaxStateMachine_DExpectQDictSsm.cpp
|
||||
facet/IPrintable_DExpectQDictSsm.cpp
|
||||
|
||||
DProgressSsm.cpp
|
||||
ISyntaxStateMachine_DProgressSsm.cpp
|
||||
IPrintable_DProgressSsm.cpp
|
||||
|
|
@ -107,8 +111,6 @@ xo_dependency(${SELF_LIB} xo_type)
|
|||
xo_dependency(${SELF_LIB} xo_tokenizer2)
|
||||
xo_dependency(${SELF_LIB} xo_expression2)
|
||||
#xo_dependency(${SELF_LIB} reflect)
|
||||
#xo_dependency(${SELF_LIB} xo_object2)
|
||||
#xo_dependency(${SELF_LIB} xo_printable2)
|
||||
#xo_dependency(${SELF_LIB} xo_flatstring)
|
||||
xo_dependency(${SELF_LIB} subsys)
|
||||
#xo_dependency(${SELF_LIB} indentlog)
|
||||
|
|
|
|||
270
src/reader2/DExpectQDictSsm.cpp
Normal file
270
src/reader2/DExpectQDictSsm.cpp
Normal file
|
|
@ -0,0 +1,270 @@
|
|||
/** @file DExpectQDictSsm.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Mar 2026
|
||||
**/
|
||||
|
||||
#include "ExpectQDictSsm.hpp"
|
||||
#include "ExpectQLiteralSsm.hpp"
|
||||
|
||||
namespace xo {
|
||||
using xo::print::APrintable;
|
||||
|
||||
namespace scm {
|
||||
|
||||
const char *
|
||||
QDictXst::_descr(enum code x)
|
||||
{
|
||||
switch (x) {
|
||||
case code::invalid: break;
|
||||
case code::qdict_0: return "qdict_0";
|
||||
case code::qdict_1a: return "qdict_1a";
|
||||
case code::qdict_1b: return "qdict_1b";
|
||||
case code::qdict_1c: return "qdict_1c";
|
||||
case code::qdict_1d: return "qdict_1d";
|
||||
case code::qdict_2: return "qdict_2";
|
||||
case code::N: break;
|
||||
}
|
||||
|
||||
return "?QDictXst";
|
||||
}
|
||||
|
||||
DExpectQDictSsm::DExpectQDictSsm() : state_{QDictXst::code::qdict_0} {}
|
||||
|
||||
obj<ASyntaxStateMachine,DExpectQDictSsm>
|
||||
DExpectQDictSsm::make(DArena & parser_mm)
|
||||
{
|
||||
return obj<ASyntaxStateMachine,DExpectQDictSsm>(_make(parser_mm));
|
||||
}
|
||||
|
||||
DExpectQDictSsm *
|
||||
DExpectQDictSsm::_make(DArena & parser_mm)
|
||||
{
|
||||
void * mem = parser_mm.alloc_for<DExpectQDictSsm>();
|
||||
|
||||
return new (mem) DExpectQDictSsm();
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQDictSsm::start(ParserStateMachine * p_psm)
|
||||
{
|
||||
DArena::Checkpoint ckp = p_psm->parser_alloc().checkpoint();
|
||||
|
||||
p_psm->push_ssm(ckp, DExpectQDictSsm::make(p_psm->parser_alloc()));
|
||||
}
|
||||
|
||||
syntaxstatetype
|
||||
DExpectQDictSsm::ssm_type() const noexcept {
|
||||
return syntaxstatetype::expect_qdict;
|
||||
}
|
||||
|
||||
std::string_view
|
||||
DExpectQDictSsm::get_expect_str() const {
|
||||
switch (state_.code()) {
|
||||
case QDictXst::code::qdict_0:
|
||||
return "leftbrace";
|
||||
case QDictXst::code::qdict_1a:
|
||||
return "symbol|rightbrace";
|
||||
case QDictXst::code::qdict_1b:
|
||||
return "colon";
|
||||
case QDictXst::code::qdict_1c:
|
||||
return "literal";
|
||||
case QDictXst::code::qdict_1d:
|
||||
return "semicolon|rightbrace";
|
||||
case QDictXst::code::qdict_2:
|
||||
return "(done)";
|
||||
case QDictXst::code::invalid:
|
||||
case QDictXst::code::N:
|
||||
break;
|
||||
}
|
||||
|
||||
return "?DExpectQDictSsm";
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQDictSsm::on_leftbrace_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
if (state_.code() == QDictXst::code::qdict_0) {
|
||||
constexpr DDictionary::size_type hint_cap = 8;
|
||||
|
||||
this->state_ = QDictXst(QDictXst::code::qdict_1a);
|
||||
this->dict_ = DDictionary::empty(p_psm->expr_alloc(), hint_cap);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Super::illegal_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQDictSsm::on_rightbrace_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
if ((state_.code() == QDictXst::code::qdict_1a)
|
||||
|| (state_.code() == QDictXst::code::qdict_1d))
|
||||
{
|
||||
|
||||
this->state_ = QDictXst(QDictXst::code::qdict_2);
|
||||
|
||||
obj<AGCObject> lit = obj<AGCObject,DDictionary>(dict_);
|
||||
|
||||
p_psm->pop_ssm();
|
||||
p_psm->on_quoted_literal(lit);
|
||||
return;
|
||||
}
|
||||
|
||||
Super::illegal_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQDictSsm::on_symbol_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
if (state_.code() == QDictXst::code::qdict_1a) {
|
||||
this->state_ = QDictXst(QDictXst::code::qdict_1b);
|
||||
this->key_ = DString::from_view(p_psm->expr_alloc(), std::string_view(tk.text()));
|
||||
return;
|
||||
}
|
||||
|
||||
Super::illegal_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQDictSsm::on_colon_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
if (state_.code() == QDictXst::code::qdict_1b) {
|
||||
this->state_ = QDictXst(QDictXst::code::qdict_1c);
|
||||
|
||||
DExpectQLiteralSsm::start(p_psm,
|
||||
false /*!cxl_on_rightparen*/);
|
||||
return;
|
||||
}
|
||||
|
||||
Super::illegal_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQDictSsm::on_semicolon_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
if (state_.code() == QDictXst::code::qdict_1d) {
|
||||
this->state_ = QDictXst(QDictXst::code::qdict_1a);
|
||||
return;
|
||||
}
|
||||
|
||||
Super::illegal_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQDictSsm::on_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
switch(tk.tk_type())
|
||||
{
|
||||
case tokentype::tk_leftbrace:
|
||||
this->on_leftbrace_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_symbol:
|
||||
this->on_symbol_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_rightbrace:
|
||||
this->on_rightbrace_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_colon:
|
||||
this->on_colon_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_semicolon:
|
||||
this->on_semicolon_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_rightparen:
|
||||
case tokentype::tk_comma:
|
||||
case tokentype::tk_lambda:
|
||||
case tokentype::tk_def:
|
||||
case tokentype::tk_deftype:
|
||||
case tokentype::tk_if:
|
||||
case tokentype::tk_singleassign:
|
||||
case tokentype::tk_string:
|
||||
case tokentype::tk_f64:
|
||||
case tokentype::tk_i64:
|
||||
case tokentype::tk_bool:
|
||||
case tokentype::tk_invalid:
|
||||
case tokentype::tk_quote:
|
||||
case tokentype::tk_leftparen:
|
||||
case tokentype::tk_leftbracket:
|
||||
case tokentype::tk_rightbracket:
|
||||
case tokentype::tk_leftangle:
|
||||
case tokentype::tk_rightangle:
|
||||
case tokentype::tk_cmple:
|
||||
case tokentype::tk_cmpge:
|
||||
case tokentype::tk_dot:
|
||||
case tokentype::tk_doublecolon:
|
||||
case tokentype::tk_assign:
|
||||
case tokentype::tk_yields:
|
||||
case tokentype::tk_plus:
|
||||
case tokentype::tk_minus:
|
||||
case tokentype::tk_star:
|
||||
case tokentype::tk_slash:
|
||||
case tokentype::tk_cmpeq:
|
||||
case tokentype::tk_cmpne:
|
||||
case tokentype::tk_nil:
|
||||
case tokentype::tk_type:
|
||||
case tokentype::tk_then:
|
||||
case tokentype::tk_else:
|
||||
case tokentype::tk_let:
|
||||
case tokentype::tk_in:
|
||||
case tokentype::tk_end:
|
||||
case tokentype::N:
|
||||
break;
|
||||
}
|
||||
|
||||
Super::illegal_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQDictSsm::on_quoted_literal(obj<AGCObject> lit,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
if (state_.code() == QDictXst::code::qdict_1c) {
|
||||
// adjoin (key,value) pair into dictionary
|
||||
|
||||
this->state_ = QDictXst(QDictXst::code::qdict_1d);
|
||||
|
||||
assert(dict_);
|
||||
|
||||
bool ok = dict_->upsert(p_psm->expr_alloc(), DDictionary::pair_type(key_, lit));
|
||||
|
||||
this->key_ = nullptr;
|
||||
|
||||
assert(ok);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Super::illegal_quoted_literal(lit, p_psm);
|
||||
}
|
||||
|
||||
bool
|
||||
DExpectQDictSsm::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
obj<AGCObject,DDictionary> dict(dict_);
|
||||
obj<APrintable,DDictionary> dict_pr(dict_);
|
||||
|
||||
return ppii.pps()->pretty_struct(ppii,
|
||||
"DExpectQDictSsm",
|
||||
refrtag("state", state_),
|
||||
refrtag("expect", this->get_expect_str()),
|
||||
refrtag("key", key_, key_),
|
||||
refrtag("dict", dict_pr));
|
||||
}
|
||||
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end DExpectQDictSsm.cpp */
|
||||
|
|
@ -132,6 +132,8 @@ namespace xo {
|
|||
case tokentype::N:
|
||||
break;
|
||||
}
|
||||
|
||||
Super::illegal_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -6,14 +6,10 @@
|
|||
#include "ExpectQLiteralSsm.hpp"
|
||||
#include "ExpectQListSsm.hpp"
|
||||
#include "ExpectQArraySsm.hpp"
|
||||
#include "ExpectQDictSsm.hpp"
|
||||
#include <xo/object2/Float.hpp>
|
||||
#include <xo/object2/Integer.hpp>
|
||||
//#include "ssm/ISyntaxStateMachine_DExpectFormalArgSsm.hpp"
|
||||
//#include <xo/expression2/DVariable.hpp>
|
||||
//#include <xo/expression2/detail/IGCObject_DVariable.hpp>
|
||||
//#include <xo/printable2/Printable.hpp>
|
||||
//#include <xo/alloc2/arena/IAllocator_DArena.hpp>
|
||||
//#include <xo/facet/FacetRegistry.hpp>
|
||||
#include <xo/stringtable2/String.hpp>
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
|
||||
namespace xo {
|
||||
|
|
@ -95,6 +91,10 @@ namespace xo {
|
|||
this->on_i64_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_string:
|
||||
this->on_string_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_leftparen:
|
||||
this->on_leftparen_token(tk, p_psm);
|
||||
return;
|
||||
|
|
@ -111,6 +111,10 @@ namespace xo {
|
|||
this->on_rightbracket_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_leftbrace:
|
||||
this->on_leftbrace_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_comma:
|
||||
case tokentype::tk_lambda:
|
||||
case tokentype::tk_def:
|
||||
|
|
@ -119,12 +123,10 @@ namespace xo {
|
|||
case tokentype::tk_symbol:
|
||||
case tokentype::tk_colon:
|
||||
case tokentype::tk_singleassign:
|
||||
case tokentype::tk_string:
|
||||
case tokentype::tk_bool:
|
||||
case tokentype::tk_semicolon:
|
||||
case tokentype::tk_invalid:
|
||||
case tokentype::tk_quote:
|
||||
case tokentype::tk_leftbrace:
|
||||
case tokentype::tk_rightbrace:
|
||||
case tokentype::tk_leftangle:
|
||||
case tokentype::tk_rightangle:
|
||||
|
|
@ -176,49 +178,16 @@ namespace xo {
|
|||
p_psm->on_quoted_literal(literal);
|
||||
}
|
||||
|
||||
#ifdef NOT_YET
|
||||
void
|
||||
DExpectQLiteralSsm::_accept_formal(obj<AAllocator> expr_alloc,
|
||||
DArena & parser_alloc,
|
||||
const DUniqueString * param_name,
|
||||
TypeDescr param_type)
|
||||
DExpectQLiteralSsm::on_string_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
/* note: param_type can be nullptr */
|
||||
TypeRef typeref
|
||||
= TypeRef::dwim(TypeRef::prefix_type::from_chars("formal"), param_type);
|
||||
auto literal = obj<AGCObject,DString>(DString::from_view(p_psm->expr_alloc(),
|
||||
std::string_view(tk.text())));
|
||||
|
||||
DVariable * var = DVariable::make(expr_alloc,
|
||||
param_name,
|
||||
typeref);
|
||||
|
||||
// need AGCObject facet to use DArray here.
|
||||
// May want to have gc feature that allows it to use
|
||||
// FacetRegistry on memory that stores obj<AExpression,..>
|
||||
//
|
||||
// In this case doesn't matter since DExpectQLiteralSsm not actually collected!
|
||||
|
||||
obj<AGCObject,DVariable> var_o(var);
|
||||
|
||||
if (argl_->size() == argl_->capacity()) {
|
||||
// need to expand argl_ capacity.
|
||||
// If DArena were to allow it (i.e. offer a realloc() feature,
|
||||
// could do this in place since this SSM is at the top of the parser stack.
|
||||
|
||||
obj<AAllocator,DArena> mm(&parser_alloc);
|
||||
DArray * argl_2x = DArray::empty(mm, 2 * argl_->capacity());
|
||||
|
||||
for (DArray::size_type i = 0, n = argl_->size(); i < n; ++i) {
|
||||
// TODO: prefer non-bounds-checked access here
|
||||
argl_2x->push_back(argl_->at(i));
|
||||
}
|
||||
|
||||
// update in place
|
||||
this->argl_ = argl_2x;
|
||||
}
|
||||
|
||||
this->argl_->push_back(var_o);
|
||||
p_psm->pop_ssm();
|
||||
p_psm->on_quoted_literal(literal);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
DExpectQLiteralSsm::on_leftparen_token(const Token & tk,
|
||||
|
|
@ -268,6 +237,17 @@ namespace xo {
|
|||
Super::illegal_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectQLiteralSsm::on_leftbrace_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
// replace self with specialized version for parsing a literal dict
|
||||
|
||||
p_psm->pop_ssm();
|
||||
DExpectQDictSsm::start(p_psm);
|
||||
p_psm->on_token(tk);
|
||||
}
|
||||
|
||||
bool
|
||||
DExpectQLiteralSsm::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include "ExpectExprSsm.hpp"
|
||||
#include "ExpectQLiteralSsm.hpp"
|
||||
#include "ExpectQListSsm.hpp"
|
||||
#include "ExpectQDictSsm.hpp"
|
||||
#include "ExpectQArraySsm.hpp"
|
||||
|
||||
#include <xo/printable2/detail/APrintable.hpp>
|
||||
|
|
@ -107,6 +108,9 @@ namespace xo {
|
|||
FacetRegistry::register_impl<ASyntaxStateMachine, DExpectQListSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DExpectQListSsm>();
|
||||
|
||||
FacetRegistry::register_impl<ASyntaxStateMachine, DExpectQDictSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DExpectQDictSsm>();
|
||||
|
||||
FacetRegistry::register_impl<ASyntaxStateMachine, DExpectQArraySsm>();
|
||||
FacetRegistry::register_impl<APrintable, DExpectQArraySsm>();
|
||||
|
||||
|
|
@ -128,6 +132,7 @@ namespace xo {
|
|||
log && log(xtag("DExpectExprSsm.tseq", typeseq::id<DExpectExprSsm>()));
|
||||
log && log(xtag("DExpectQLiteralSsm.tseq", typeseq::id<DExpectQLiteralSsm>()));
|
||||
log && log(xtag("DExpectQListSsm.tseq", typeseq::id<DExpectQListSsm>()));
|
||||
log && log(xtag("DExpectQDictSsm.tseq", typeseq::id<DExpectQDictSsm>()));
|
||||
log && log(xtag("DExpectQArraySsm.tseq", typeseq::id<DExpectQArraySsm>()));
|
||||
|
||||
log && log(xtag("DProgressSsm.tseq", typeseq::id<DProgressSsm>()));
|
||||
|
|
|
|||
28
src/reader2/facet/IPrintable_DExpectQDictSsm.cpp
Normal file
28
src/reader2/facet/IPrintable_DExpectQDictSsm.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/** @file IPrintable_DExpectQDictSsm.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExpectQDictSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DExpectQDictSsm.json5]
|
||||
**/
|
||||
|
||||
#include "expect_qdict/IPrintable_DExpectQDictSsm.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IPrintable_DExpectQDictSsm::pretty(const DExpectQDictSsm & self, const ppindentinfo & ppii) -> bool
|
||||
{
|
||||
return self.pretty(ppii);
|
||||
}
|
||||
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExpectQDictSsm.cpp */
|
||||
84
src/reader2/facet/ISyntaxStateMachine_DExpectQDictSsm.cpp
Normal file
84
src/reader2/facet/ISyntaxStateMachine_DExpectQDictSsm.cpp
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/** @file ISyntaxStateMachine_DExpectQDictSsm.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DExpectQDictSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/ISyntaxStateMachine_DExpectQDictSsm.json5]
|
||||
**/
|
||||
|
||||
#include "expect_qdict/ISyntaxStateMachine_DExpectQDictSsm.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::ssm_type(const DExpectQDictSsm & self) noexcept -> syntaxstatetype
|
||||
{
|
||||
return self.ssm_type();
|
||||
}
|
||||
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::get_expect_str(const DExpectQDictSsm & self) noexcept -> std::string_view
|
||||
{
|
||||
return self.get_expect_str();
|
||||
}
|
||||
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_token(DExpectQDictSsm & self, const Token & tk, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_token(tk, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_parsed_symbol(DExpectQDictSsm & self, std::string_view sym, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_symbol(sym, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_parsed_typedescr(DExpectQDictSsm & self, TypeDescr td, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_typedescr(td, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_parsed_type(DExpectQDictSsm & self, obj<AType> type, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_type(type, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_parsed_formal(DExpectQDictSsm & self, const DUniqueString * param_name, TypeDescr param_type, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_formal(param_name, param_type, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_parsed_formal_with_token(DExpectQDictSsm & self, const DUniqueString * param_name, TypeDescr param_type, const Token & tk, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_formal_with_token(param_name, param_type, tk, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_parsed_formal_arglist(DExpectQDictSsm & self, DArray * arglist, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_formal_arglist(arglist, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_parsed_expression(DExpectQDictSsm & self, obj<AExpression> expr, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_expression(expr, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_parsed_expression_with_token(DExpectQDictSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_expression_with_token(expr, tk, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectQDictSsm::on_quoted_literal(DExpectQDictSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_quoted_literal(lit, p_psm);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DExpectQDictSsm.cpp */
|
||||
|
|
@ -51,6 +51,8 @@ namespace xo {
|
|||
return "expect-qlist";
|
||||
case syntaxstatetype::expect_qarray:
|
||||
return "expect-qarray";
|
||||
case syntaxstatetype::expect_qdict:
|
||||
return "expect-qdict";
|
||||
case syntaxstatetype::N:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue