diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2022-11-27 15:27:50 +0000 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2022-12-08 12:59:50 +0000 |
commit | cd7d784879026948126140d82b84bb39bb779c2e (patch) | |
tree | 2401c913fa64207ddecaf38e2f95d5c36a5fbf2b /embed.fnc | |
parent | fe31205d63da5c2b38cf8ffbdf08f3a18430a0da (diff) | |
download | perl-cd7d784879026948126140d82b84bb39bb779c2e.tar.gz |
Define a PL_infix_plugin hook, of a similar style to PL_keyword_plugin
Runs for identifier-named custom infix operators and sequences of
non-identifier symbol characters.
Defines multiple precedence levels for custom infix operators that fit
alongside exponentiation, multiplication, addition, or relational
comparision operators, as well as a "high" and "low" at either end.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1572,6 +1572,7 @@ Apd |void |cv_set_call_checker_flags|NN CV *cv \ |NN Perl_call_checker ckfun \ |NN SV *ckobj|U32 ckflags Apd |void |wrap_op_checker|Optype opcode|NN Perl_check_t new_checker|NN Perl_check_t *old_checker_p +Axpd |void |wrap_infix_plugin|NN Perl_infix_plugin_t new_plugin|NN Perl_infix_plugin_t *old_plugin_p Axpd |void |wrap_keyword_plugin|NN Perl_keyword_plugin_t new_plugin|NN Perl_keyword_plugin_t *old_plugin_p CpR |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems Apd |char* |scan_vstring |NN const char *s|NN const char *const e \ @@ -1600,6 +1601,7 @@ p |void |opslab_force_free|NN OPSLAB *slab #endif : Used in perly.y p |void |package |NN OP* o +p |OP * |build_infix_plugin|NN OP *lhs|NN OP *rhs|NN void *tokendata : Used in perly.y p |void |package_version|NN OP* v : Used in toke.c and perly.y @@ -3821,6 +3823,8 @@ Apxd |void|cop_store_label \ epo |int |keyword_plugin_standard|NN char* keyword_ptr|STRLEN keyword_len|NN OP** op_ptr +epo |STRLEN |infix_plugin_standard|NN char* operator_ptr|STRLEN operator_len|NN struct Perl_custom_infix** def + #if defined(USE_ITHREADS) # if defined(PERL_IN_SV_C) S |void |unreferenced_to_tmp_stack|NN AV *const unreferenced |