X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fcompiler.c;h=de23f22b6a13f2d2e92784d7dfe5f7f0566ab19b;hb=8a7da6f65154bb96d47695cbcbf42684cccb0aad;hp=36bb1fac565b0da3a70fa9b2af1ba272aade847b;hpb=15d3df10f09bd780efa101d0c253db96716eb145;p=swftools.git diff --git a/lib/as3/compiler.c b/lib/as3/compiler.c index 36bb1fa..de23f22 100644 --- a/lib/as3/compiler.c +++ b/lib/as3/compiler.c @@ -21,6 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "common.h" #include "tokenizer.h" #include "files.h" #include "parser.h" @@ -39,6 +40,8 @@ extern int a3_parse(); extern int as3_lex(); extern int as3_lex_destroy(); +static char config_recurse = 0; + void as3_setverbosity(int level) { as3_verbosity=level; @@ -47,6 +50,12 @@ void as3_add_include_dir(char*dir) { add_include_dir(dir); } +void as3_set_option(const char*key, const char*value) +{ + if(!strcmp(key, "recurse")) { + config_recurse=atoi(value); + } +} static char registry_initialized = 0; static char parser_initialized = 0; @@ -190,7 +199,7 @@ void as3_parse_file(const char*filename) compile_list = 0; as3_pass = 1; - as3_parse_file_or_array(filename, fullfilename, 0,0); + as3_schedule_file(filename, fullfilename); as3_parse_scheduled(); registry_resolve_all(); @@ -319,7 +328,9 @@ void as3_schedule_class(const char*package, const char*cls) void as3_schedule_class_noerror(const char*package, const char*cls) { - schedule_class(package, cls, 0); + if(config_recurse) { + schedule_class(package, cls, 0); + } }