summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-23 03:38:10 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-23 03:38:10 -0400
commit45baf996b659c715141b6ed5c700400b49bc95e8 (patch)
tree20842fe1c602d75d743514d0bf9b3358516c9cb4
parent9e4b587dca809519106f004df09f5aa01b721e9a (diff)
downloadparse-keyword-45baf996b659c715141b6ed5c700400b49bc95e8.tar.gz
parse-keyword-45baf996b659c715141b6ed5c700400b49bc95e8.zip
don't break scopes and such
-rw-r--r--Keyword.xs18
1 files changed, 9 insertions, 9 deletions
diff --git a/Keyword.xs b/Keyword.xs
index b52f98c..a68af05 100644
--- a/Keyword.xs
+++ b/Keyword.xs
@@ -22,25 +22,25 @@
static SV *parser_fn(OP *(fn)(pTHX_ U32), bool named)
{
I32 floor;
- OP *parsed;
CV *code;
REENTER_PARSER;
floor = start_subparse(0, named ? 0 : CVf_ANON);
- parsed = fn(aTHX_ 0);
- if (PL_parser->error_count) {
- return newSV(0);
- }
- code = newATTRSUB(floor, NULL, NULL, NULL, parsed);
+ code = newATTRSUB(floor, NULL, NULL, NULL, fn(aTHX_ 0));
LEAVE_PARSER;
- if (CvCLONE(code)) {
- code = cv_clone(code);
+ if (PL_parser->error_count) {
+ return newSV(0);
}
+ else {
+ if (CvCLONE(code)) {
+ code = cv_clone(code);
+ }
- return newRV_inc((SV*)code);
+ return newRV_inc((SV*)code);
+ }
}
static OP *parser_callback(pTHX_ GV *namegv, SV *psobj, U32 *flagsp)