From 159cd76020e876caa8bc29314f2d52cd59487c38 Mon Sep 17 00:00:00 2001 From: belliash Date: Sat, 28 Jul 2018 22:48:32 +0200 Subject: [PATCH] No need to duplicate exit() --- engine/compiler.c | 1 - engine/lexer.c | 1 - engine/vm.c | 1 - include/ph7int.h | 1 - 4 files changed, 4 deletions(-) diff --git a/engine/compiler.c b/engine/compiler.c index d7ed4cd..245da82 100644 --- a/engine/compiler.c +++ b/engine/compiler.c @@ -5511,7 +5511,6 @@ static const LangConstruct aLangConstruct[] = { { PH7_TKWRD_DO, PH7_CompileDoWhile }, /* do{ }while(); statement */ { PH7_TKWRD_GLOBAL, PH7_CompileGlobal }, /* global statement */ { PH7_TKWRD_STATIC, PH7_CompileStatic }, /* static statement */ - { PH7_TKWRD_DIE, PH7_CompileHalt }, /* die language construct */ { PH7_TKWRD_EXIT, PH7_CompileHalt }, /* exit language construct */ { PH7_TKWRD_TRY, PH7_CompileTry }, /* try statement */ { PH7_TKWRD_THROW, PH7_CompileThrow }, /* throw statement */ diff --git a/engine/lexer.c b/engine/lexer.c index 5682e51..c4babdb 100644 --- a/engine/lexer.c +++ b/engine/lexer.c @@ -610,7 +610,6 @@ static sxu32 KeywordCode(const char *z, int n) { {"float", PH7_TKWRD_FLOAT}, {"var", PH7_TKWRD_VAR}, {"array", PH7_TKWRD_ARRAY}, - {"die", PH7_TKWRD_DIE}, {"abstract", PH7_TKWRD_ABSTRACT}, {"class", PH7_TKWRD_CLASS}, {"as", PH7_TKWRD_AS}, diff --git a/engine/vm.c b/engine/vm.c index 9396e19..771f145 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -11623,7 +11623,6 @@ static const ph7_builtin_func aVmFunc[] = { { "echo", vm_builtin_echo }, { "print", vm_builtin_print }, { "exit", vm_builtin_exit }, - { "die", vm_builtin_exit }, { "eval", vm_builtin_eval }, /* Variable handling functions */ { "get_defined_vars", vm_builtin_get_defined_vars}, diff --git a/include/ph7int.h b/include/ph7int.h index 8c70982..78f203f 100644 --- a/include/ph7int.h +++ b/include/ph7int.h @@ -1512,7 +1512,6 @@ enum ph7_expr_id { #define PH7_TKWRD_AS 33 /* as */ #define PH7_TKWRD_CONTINUE 34 /* continue */ #define PH7_TKWRD_EXIT 35 /* exit */ -#define PH7_TKWRD_DIE 36 /* die */ #define PH7_TKWRD_ECHO 37 /* echo */ #define PH7_TKWRD_GLOBAL 38 /* global */ #define PH7_TKWRD_IMPLEMENTS 39 /* implements */