File tree 1 file changed +27
-0
lines changed
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)
3788
3788
return es_true ;
3789
3789
}
3790
3790
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
+
3791
3812
static struct optscriptOperatorRegistration lropOperators [] = {
3792
3813
{
3793
3814
.name = "_matchstr" ,
@@ -3934,6 +3955,12 @@ static struct optscriptOperatorRegistration lropOperators [] = {
3934
3955
.arity = 0 ,
3935
3956
.help_str = "- _TRACED true|false" ,
3936
3957
},
3958
+ {
3959
+ .name = "_markplaceholder" ,
3960
+ .fn = lrop_markplaceholder ,
3961
+ .arity = 1 ,
3962
+ .help_str = "tag:int _MARKPLACEHOLDER -" ,
3963
+ }
3937
3964
};
3938
3965
3939
3966
extern void initRegexOptscript (void )
You can’t perform that action at this time.
0 commit comments