From 336e491e532144d1c8a6e367409149e8d084fa1d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 21 Jul 2013 16:48:18 -0400 Subject: add parse_arithexpr --- Keyword.xs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Keyword.xs') diff --git a/Keyword.xs b/Keyword.xs index e5193c8..b041e25 100644 --- a/Keyword.xs +++ b/Keyword.xs @@ -111,6 +111,27 @@ parse_block() OUTPUT: RETVAL +SV * +parse_arithexpr() + PREINIT: + I32 floor; + CV *code; + CODE: + REENTER_PARSER; + + floor = start_subparse(0, CVf_ANON); + code = newATTRSUB(floor, NULL, NULL, NULL, parse_arithexpr(0)); + + LEAVE_PARSER; + + if (CvCLONE(code)) { + code = cv_clone(code); + } + + RETVAL = newRV_inc((SV*)code); + OUTPUT: + RETVAL + SV * lex_peek(len = 1) UV len -- cgit v1.2.3-54-g00ecf