|
|
| version 1.169, 2009/01/12 07:09:08 | version 1.173, 2009/04/17 09:05:33 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: @b string parser class. | Parser: @b string parser class. |
| Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| Line 116 static void _bool(Request& r, MethodPara | Line 116 static void _bool(Request& r, MethodPara |
| rethrow; // we have a problem when no default | rethrow; // we have a problem when no default |
| } | } |
| r.write_no_lang(*new VBool(converted)); | r.write_no_lang(VBool::get(converted)); |
| } | } |
| /*not static*/void _string_format(Request& r, MethodParams& params) { | /*not static*/void _string_format(Request& r, MethodParams& params) { |
| Line 360 static void replace_action(Table& table, | Line 360 static void replace_action(Table& table, |
| *ai.dest << ai.src->mid(poststart, postfinish); | *ai.dest << ai.src->mid(poststart, postfinish); |
| } | } |
| /// @todo use pcre:study somehow | /// @todo use pcre_study somehow |
| static void _match(Request& r, MethodParams& params) { | static void _match(Request& r, MethodParams& params) { |
| Value& regexp=params.as_no_junction(0, "regexp must not be code"); | Value& regexp=params.as_no_junction(0, "regexp must not be code"); |
| Line 376 static void _match(Request& r, MethodPar | Line 376 static void _match(Request& r, MethodPar |
| regexp.as_string(), options, | regexp.as_string(), options, |
| search_action, 0, | search_action, 0, |
| matches_count); | matches_count); |
| // r.write_assign_lang(*new VTable(table)); | |
| if(table){ | if(table){ |
| r.write_assign_lang(*new VTable(table)); | r.write_assign_lang(*new VTable(table)); |
| } else { | } else { |
| r.write_assign_lang(*new VInt(matches_count)); | r.write_no_lang(*new VInt(matches_count)); |
| } | } |
| } else { // replace | } else { // replace |
| Line 399 static void _match(Request& r, MethodPar | Line 398 static void _match(Request& r, MethodPar |
| *replacement_code.get_junction()->method_frame, | *replacement_code.get_junction()->method_frame, |
| match_var_name, vtable); | match_var_name, vtable); |
| src.match(r.charsets.source(), | src.match(r.charsets.source(), |
| r.process_to_string(regexp), options, | regexp.as_string(), options, |
| replace_action, &info, | replace_action, &info, |
| matches_count); | matches_count); |
| r.write_assign_lang(result); | r.write_assign_lang(result); |