diff --git a/parse.c b/parse.c index 97f75a7..59387f9 100644 --- a/parse.c +++ b/parse.c @@ -570,28 +570,6 @@ enum ParseResult ParseStatement(struct ParseState *Parser, int CheckTrailingSemi CheckTrailingSemicolon = FALSE; break; } -#ifdef FEATURE_AUTO_DECLARE_VARIABLES - else /* new_identifier = something */ { - /* try to guess type and declare the variable based on assigned value */ - if (NextToken == TokenAssign && !VariableDefinedAndOutOfScope(Parser->pc, LexerValue->Val->Identifier)) { - if (Parser->Mode == RunModeRun) { - struct Value *CValue; - char* Identifier = LexerValue->Val->Identifier; - LexGetToken(Parser, NULL, TRUE); - if (!ExpressionParse(Parser, &CValue)) { - ProgramFail(Parser, "expected: expression"); - } -#if 0 - PRINT_SOURCE_POS(); - PlatformPrintf(Parser->pc->CStdOut, "%t %s = %d;\n", CValue->Typ, Identifier, CValue->Val->Integer); - printf("%d\n", VariableDefined(Parser->pc, Identifier)); -#endif - VariableDefine(Parser->pc, Parser, Identifier, CValue, CValue->Typ, TRUE); - break; - } - } - } -#endif } /* else fallthrough to expression */ /* no break */ diff --git a/platform.h b/platform.h index 6c73f8d..3eea07d 100644 --- a/platform.h +++ b/platform.h @@ -25,7 +25,6 @@ #undef DEBUG_EXPRESSIONS #undef FANCY_ERROR_MESSAGES #undef DEBUG_ARRAY_INITIALIZER -#undef FEATURE_AUTO_DECLARE_VARIABLES #undef DEBUG_LEXER #undef VAR_SCOPE_DEBUG