diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2022-12-15 17:36:00 +0000 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2022-12-16 20:17:50 +0000 |
commit | 8bd31da072706b4f51a1d682a5f3b6d002cc3d60 (patch) | |
tree | 605cc2d8798a53d5ba11625506ffc04d480d14a8 /perl.h | |
parent | bab261c9114a5ca4aee6acea592e42b95068af70 (diff) | |
download | perl-8bd31da072706b4f51a1d682a5f3b6d002cc3d60.tar.gz |
Add comment to infix operator precedence enum about when we can/can't change the numbers
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -6003,8 +6003,12 @@ typedef void (*XSINIT_t) (pTHX); typedef void (*ATEXIT_t) (pTHX_ void*); typedef void (*XSUBADDR_t) (pTHX_ CV *); -/* TODO: find somewhere to store this */ enum Perl_custom_infix_precedence { + /* These numbers are spaced out to give room to insert new values as + * required. They form part of the ABI contract with XS::Parse::Infix so + * they should not be changed within a stable release cycle, but they can + * be freely altered during a development cycle because no ABI guarantees + * are made at that time */ INFIX_PREC_LOW = 10, /* non-associative */ INFIX_PREC_REL = 30, /* non-associative, just below `==` */ INFIX_PREC_ADD = 50, /* left-associative, same precedence as `+` */ |