Skip to content

Commit

Permalink
remove unused headers
Browse files Browse the repository at this point in the history
  • Loading branch information
chloro-pn committed Jul 16, 2024
1 parent 4936668 commit 9231e34
Show file tree
Hide file tree
Showing 16 changed files with 3 additions and 28 deletions.
3 changes: 0 additions & 3 deletions include/wamon/context.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#pragma once

#include <cassert>
#include <exception>
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <unordered_map>

Expand Down
1 change: 0 additions & 1 deletion include/wamon/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <exception>
#include <string>
#include <utility>
#include <vector>

#include "fmt/format.h"

Expand Down
1 change: 0 additions & 1 deletion include/wamon/package_unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "wamon/exception.h"
#include "wamon/function_def.h"
#include "wamon/method_def.h"
#include "wamon/operator_def.h"
#include "wamon/prepared_package_name.h"
#include "wamon/struct_def.h"
#include "wamon/type.h"
Expand Down
1 change: 0 additions & 1 deletion include/wamon/parser.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include <numeric>
#include <string>
#include <vector>

Expand Down
1 change: 0 additions & 1 deletion include/wamon/scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <any>
#include <iostream>
#include <sstream>
#include <vector>

#include "wamon/token.h"
Expand Down
1 change: 0 additions & 1 deletion include/wamon/static_analyzer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include <cassert>
#include <stack>

#include "wamon/ast.h"
#include "wamon/builtin_functions.h"
Expand Down
2 changes: 0 additions & 2 deletions include/wamon/token.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once

#include <stdexcept>

#include "wamon/exception.h"

namespace wamon {
Expand Down
6 changes: 1 addition & 5 deletions include/wamon/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@
#include <cassert>
#include <memory>
#include <string>
#include <string_view>
#include <unordered_map>
#include <utility>
#include <vector>

#include "wamon/token.h"

/*
* 类型系统:
* - 基本类型:
Expand Down Expand Up @@ -113,7 +109,7 @@ class FuncType : public CompoundType {
const FuncCallExpr* call_expr);

FuncType(std::vector<std::unique_ptr<Type>>&& param_type, std::unique_ptr<Type>&& return_type)
: param_type_(std::move(param_type)), return_type_(std::move(return_type)) {}
: return_type_(std::move(return_type)), param_type_(std::move(param_type)) {}

void SetParamTypeAndReturnType(std::vector<std::unique_ptr<Type>>&& param_type, std::unique_ptr<Type>&& return_type) {
param_type_ = std::move(param_type);
Expand Down
3 changes: 0 additions & 3 deletions include/wamon/type_checker.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#pragma once

#include <set>

#include "wamon/ast.h"
#include "wamon/context.h"
#include "wamon/static_analyzer.h"
#include "wamon/type.h"

Expand Down
1 change: 0 additions & 1 deletion src/inner_type_method.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <wamon/interpreter.h>

#include "wamon/exception.h"
#include "wamon/package_unit.h"
#include "wamon/variable_list.h"

namespace wamon {
Expand Down
1 change: 0 additions & 1 deletion src/interpreter.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "wamon/interpreter.h"

#include "wamon/exception.h"
#include "wamon/move_wrapper.h"
#include "wamon/operator.h"
#include "wamon/parser.h"
#include "wamon/parsing_package.h"
Expand Down
2 changes: 1 addition & 1 deletion src/package_unit.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "wamon/package_unit.h"

#include "wamon/lambda_function_set.h"
#include "wamon/move_wrapper.h"
#include "wamon/operator_def.h"

namespace wamon {

Expand Down
3 changes: 0 additions & 3 deletions src/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

#include <cassert>
#include <stack>
#include <stdexcept>
#include <utility>

#include "fmt/format.h"
#include "wamon/capture_id_item.h"
#include "wamon/lambda_function_set.h"
#include "wamon/method_def.h"
#include "wamon/operator.h"
#include "wamon/package_unit.h"
Expand Down
2 changes: 0 additions & 2 deletions src/parsing_package.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "wamon/parsing_package.h"

#include <algorithm>

#include "wamon/exception.h"
#include "wamon/package_unit.h"
#include "wamon/prepared_package_name.h"
Expand Down
1 change: 0 additions & 1 deletion src/scanner.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "wamon/scanner.h"

#include <regex>
#include <stdexcept>

#include "wamon/exception.h"
#include "wamon/key_words.h"
Expand Down
2 changes: 1 addition & 1 deletion src/type_checker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#include <string>
#include <vector>

#include "fmt/format.h"
#include "wamon/builtin_functions.h"
#include "wamon/exception.h"
#include "wamon/function_def.h"
#include "wamon/inner_type_method.h"
#include "wamon/operator_def.h"
#include "wamon/package_unit.h"
#include "wamon/static_analyzer.h"
#include "wamon/token.h"
Expand Down

0 comments on commit 9231e34

Please sign in to comment.