diff options
Diffstat (limited to 'src/parser/parsers.h')
-rw-r--r-- | src/parser/parsers.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/parser/parsers.h b/src/parser/parsers.h index 4a2b99d84..0dde4b765 100644 --- a/src/parser/parsers.h +++ b/src/parser/parsers.h @@ -304,6 +304,8 @@ Result<> makeStringSliceWTF(Ctx&, template<typename Ctx> Result<> makeStringSliceIter(Ctx&, Index, const std::vector<Annotation>&); template<typename Ctx> +Result<> makeContBind(Ctx&, Index, const std::vector<Annotation>&); +template<typename Ctx> Result<> makeContNew(Ctx*, Index, const std::vector<Annotation>&); template<typename Ctx> Result<> makeResume(Ctx&, Index, const std::vector<Annotation>&); @@ -2459,6 +2461,19 @@ Result<> makeStringSliceIter(Ctx& ctx, return ctx.makeStringSliceIter(pos, annotations); } +// contbind ::= 'cont.bind' typeidx typeidx +template<typename Ctx> +Result<> +makeContBind(Ctx& ctx, Index pos, const std::vector<Annotation>& annotations) { + auto typeBefore = typeidx(ctx); + CHECK_ERR(typeBefore); + + auto typeAfter = typeidx(ctx); + CHECK_ERR(typeAfter); + + return ctx.makeContBind(pos, annotations, *typeBefore, *typeAfter); +} + template<typename Ctx> Result<> makeContNew(Ctx& ctx, Index pos, const std::vector<Annotation>& annotations) { |