From d9ba2cbf2c8a35d2d11e2fa2f7fbd02d862bebfd Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 21 Jul 2013 16:51:56 -0400 Subject: reorder some stuff --- Keyword.xs | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'Keyword.xs') diff --git a/Keyword.xs b/Keyword.xs index b041e25..6819978 100644 --- a/Keyword.xs +++ b/Keyword.xs @@ -84,12 +84,42 @@ install_keyword_handler(keyword, handler) CODE: cv_set_call_parser((CV*)SvRV(keyword), parser_callback, handler); +SV * +lex_peek(len = 1) + UV len + CODE: + PL_curcop = &PL_compiling; + while (PL_parser->bufend - PL_parser->bufptr < len) { + if (!lex_next_chunk(LEX_KEEP_PREVIOUS)) { + break; + } + } + if (PL_parser->bufend - PL_parser->bufptr < len) { + len = PL_parser->bufend - PL_parser->bufptr; + } + RETVAL = newSVpvn(PL_parser->bufptr, len); /* XXX unicode? */ + OUTPUT: + RETVAL + +void +lex_read(len = 1) + UV len + CODE: + PL_curcop = &PL_compiling; + lex_read_to(PL_parser->bufptr + len); + void lex_read_space() CODE: PL_curcop = &PL_compiling; lex_read_space(0); +void +lex_stuff(str) + SV *str + CODE: + lex_stuff_sv(str, 0); + SV * parse_block() PREINIT: @@ -132,39 +162,9 @@ parse_arithexpr() OUTPUT: RETVAL -SV * -lex_peek(len = 1) - UV len - CODE: - PL_curcop = &PL_compiling; - while (PL_parser->bufend - PL_parser->bufptr < len) { - if (!lex_next_chunk(LEX_KEEP_PREVIOUS)) { - break; - } - } - if (PL_parser->bufend - PL_parser->bufptr < len) { - len = PL_parser->bufend - PL_parser->bufptr; - } - RETVAL = newSVpvn(PL_parser->bufptr, len); /* XXX unicode? */ - OUTPUT: - RETVAL - -void -lex_read(len = 1) - UV len - CODE: - PL_curcop = &PL_compiling; - lex_read_to(PL_parser->bufptr + len); - SV * compiling_package() CODE: RETVAL = newSVsv(PL_curstname); OUTPUT: RETVAL - -void -lex_stuff(str) - SV *str - CODE: - lex_stuff_sv(str, 0); -- cgit v1.2.3-54-g00ecf