diff options
Diffstat (limited to 'src/parser/parsers.h')
-rw-r--r-- | src/parser/parsers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/parser/parsers.h b/src/parser/parsers.h index 0150af811..51b5d8f9e 100644 --- a/src/parser/parsers.h +++ b/src/parser/parsers.h @@ -309,6 +309,8 @@ template<typename Ctx> Result<> makeContNew(Ctx*, Index, const std::vector<Annotation>&); template<typename Ctx> Result<> makeResume(Ctx&, Index, const std::vector<Annotation>&); +template<typename Ctx> +Result<> makeSuspend(Ctx&, Index, const std::vector<Annotation>&); // Modules template<typename Ctx> MaybeResult<Index> maybeTypeidx(Ctx& ctx); @@ -2498,6 +2500,15 @@ makeResume(Ctx& ctx, Index pos, const std::vector<Annotation>& annotations) { return ctx.makeResume(pos, annotations, *type, tagLabels); } +template<typename Ctx> +Result<> +makeSuspend(Ctx& ctx, Index pos, const std::vector<Annotation>& annotations) { + auto tag = tagidx(ctx); + CHECK_ERR(tag); + + return ctx.makeSuspend(pos, annotations, *tag); +} + // ======= // Modules // ======= |