Skip to content

Commit a0022e1

Browse files
committed
Added parser setting
1 parent 54dd7c9 commit a0022e1

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

lib/Syntax/Keyword/Assert.xs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ ok:
213213
RETURN;
214214
}
215215

216-
static int build_assert(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata)
216+
static int build_assert(pTHX_ OP **out, XSParseKeywordPiece *args[], size_t nargs, void *hookdata)
217217
{
218-
OP *argop = arg0->op;
218+
OP *argop = args[0]->op;
219219
if (assert_enabled) {
220220
enum BinopType binoptype = classify_binop(argop->op_type);
221221
if (binoptype) {
@@ -239,8 +239,15 @@ static int build_assert(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdat
239239

240240
static const struct XSParseKeywordHooks hooks_assert = {
241241
.permit_hintkey = "Syntax::Keyword::Assert/assert",
242-
.piece1 = XPK_TERMEXPR_SCALARCTX,
243-
.build1 = &build_assert,
242+
.pieces = (const struct XSParseKeywordPieceType[]) {
243+
XPK_ARGS(
244+
XPK_TERMEXPR_SCALARCTX,
245+
XPK_OPTIONAL(XPK_COMMA),
246+
XPK_TERMEXPR_SCALARCTX_OPT
247+
),
248+
{0}
249+
},
250+
.build = &build_assert,
244251
};
245252

246253
MODULE = Syntax::Keyword::Assert PACKAGE = Syntax::Keyword::Assert

0 commit comments

Comments
 (0)