diff --git a/squirrel/sqastcodegen.cpp b/squirrel/sqastcodegen.cpp index aa3a976..cbaa331 100644 --- a/squirrel/sqastcodegen.cpp +++ b/squirrel/sqastcodegen.cpp @@ -673,23 +673,6 @@ void CodegenVisitor::visitTableDecl(TableDecl *tableDecl) { generateTableDecl(tableDecl); } -void CodegenVisitor::checkClassKey(Expr *key) { - switch (key->op()) - { - case TO_GETFIELD: - case TO_GETSLOT: - case TO_ROOT_TABLE_ACCESS: - return; - case TO_BASE: - case TO_ID: - reportDiagnostic(key, DiagnosticsId::DI_LOCAL_CLASS_SYNTAX); - break; - default: - reportDiagnostic(key, DiagnosticsId::DI_INVALID_CLASS_NAME); - break; - } -} - void CodegenVisitor::visitClassDecl(ClassDecl *klass) { addLineNumber(klass); diff --git a/squirrel/sqastcodegen.h b/squirrel/sqastcodegen.h index 31caa79..96ae041 100644 --- a/squirrel/sqastcodegen.h +++ b/squirrel/sqastcodegen.h @@ -60,8 +60,6 @@ class CodegenVisitor : public Visitor { void generateTableDecl(TableDecl *tableDecl); - void checkClassKey(Expr *key); - SQTable* GetScopedConstsTable(); void emitUnaryOp(SQOpcode op, UnExpr *arg); diff --git a/squirrel/sqcompilationcontext.h b/squirrel/sqcompilationcontext.h index 354b6b2..a1720c0 100644 --- a/squirrel/sqcompilationcontext.h +++ b/squirrel/sqcompilationcontext.h @@ -66,8 +66,6 @@ class KeyValueFile; DEF_DIAGNOSTIC(INVALID_SLOT_INIT, ERROR, SEMA, -1, "", "Invalid slot initializer '%s' - no such variable/constant or incorrect expression"), \ DEF_DIAGNOSTIC(CANNOT_DELETE, ERROR, SEMA, -1, "", "can't delete %s"), \ DEF_DIAGNOSTIC(CONFLICTS_WITH, ERROR, SEMA, -1, "", "%s name '%s' conflicts with %s"), \ - DEF_DIAGNOSTIC(LOCAL_CLASS_SYNTAX, ERROR, SEMA, -1, "", "cannot create a local class with the syntax (class )"), \ - DEF_DIAGNOSTIC(INVALID_CLASS_NAME, ERROR, SEMA, -1, "", "invalid class name or context"), \ DEF_DIAGNOSTIC(INC_DEC_NOT_ASSIGNABLE, ERROR, SEMA, -1, "", "argument of inc/dec operation is not assignable"), \ DEF_DIAGNOSTIC(SPACE_SEP_FIELD_NAME, ERROR, SEMA, -1, "", "Separate access operator '%s' with it's following name is forbidden"), \ DEF_DIAGNOSTIC(TOO_MANY_SYMBOLS, ERROR, SEMA, -1, "", "internal compiler error: too many %s"), \