File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -3788,6 +3788,27 @@ static EsObject *lrop_advanceto (OptVM *vm, EsObject *name)
37883788 return es_true ;
37893789}
37903790
3791+ static EsObject * lrop_markplaceholder (OptVM * vm , EsObject * name )
3792+ {
3793+ EsObject * tag = opt_vm_ostack_top (vm );
3794+
3795+ if (!es_integer_p (tag ))
3796+ return OPT_ERR_TYPECHECK ;
3797+
3798+ int n = es_integer_get (tag );
3799+ if (! (CORK_NIL < n && n < countEntryInCorkQueue ()))
3800+ return OPT_ERR_RANGECHECK ;
3801+
3802+ tagEntryInfo * e = getEntryInCorkQueue (n );
3803+ if (e == NULL )
3804+ return OPTSCRIPT_ERR_NOTAGENTRY ;
3805+
3806+ markTagPlaceholder (e , true);
3807+
3808+ opt_vm_ostack_pop (vm );
3809+ return es_false ;
3810+ }
3811+
37913812static struct optscriptOperatorRegistration lropOperators [] = {
37923813 {
37933814 .name = "_matchstr" ,
@@ -3934,6 +3955,12 @@ static struct optscriptOperatorRegistration lropOperators [] = {
39343955 .arity = 0 ,
39353956 .help_str = "- _TRACED true|false" ,
39363957 },
3958+ {
3959+ .name = "_markplaceholder" ,
3960+ .fn = lrop_markplaceholder ,
3961+ .arity = 1 ,
3962+ .help_str = "tag:int _MARKPLACEHOLDER -" ,
3963+ }
39373964};
39383965
39393966extern void initRegexOptscript (void )
You can’t perform that action at this time.
0 commit comments