public static void CheckVarDecl(InstrNode node, ref Environment env) { VarDecl variable = (VarDecl)node.Value; TypeDesc varType = TypeResolver.ResolveType(variable.Value, env, variable.Value.Position); if (variable.Type == null && !(varType is NullType)) { variable.Type = new TypeNode(varType, variable.Value.Position); } env.AddEntry(variable.Name, varType, node.Position); }