diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-21 16:48:18 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-21 16:48:18 -0400 |
commit | 336e491e532144d1c8a6e367409149e8d084fa1d (patch) | |
tree | 0d254ad84847ca6c6fb134acf78f93229f469685 | |
parent | 463e4ebe558484bd14ac3d051c811d4817454ee9 (diff) | |
download | parse-keyword-336e491e532144d1c8a6e367409149e8d084fa1d.tar.gz parse-keyword-336e491e532144d1c8a6e367409149e8d084fa1d.zip |
add parse_arithexpr
-rw-r--r-- | Keyword.xs | 21 | ||||
-rw-r--r-- | lib/Parse/Keyword.pm | 1 |
2 files changed, 22 insertions, 0 deletions
@@ -112,6 +112,27 @@ parse_block() 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 CODE: diff --git a/lib/Parse/Keyword.pm b/lib/Parse/Keyword.pm index ee0049a..83acbbd 100644 --- a/lib/Parse/Keyword.pm +++ b/lib/Parse/Keyword.pm @@ -49,6 +49,7 @@ sub import { lex_read_space lex_read parse_block + parse_arithexpr compiling_package lex_stuff ); |