The statement stores its tokens in the values array. All of these contain pointers into the values array, again stored as integers. The number -1 is used for errors or as a NULL value. This function is in the Perl independent part, but it needs the possibility to retrieve data from the Perl part, for example column or parameter values. Again, see the BOOL symbol for an example.
Third thing is to extend the builtin parsers.
If they support your feature, add a 1, otherwise a 0. The complete module code is reentrant. That means, the module is ready for multithreading, as long as you don't share handles between threads. Read-only handles, for example parsers, can even be shared. Statement handles cannot be shared among threads, at least not, if you don't grant serialized access.