Skip to content

Commit eaf2999

Browse files
committed
adjust structure
1 parent a12a2ad commit eaf2999

25 files changed

Lines changed: 20 additions & 21 deletions

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ build
44
a.out
55
*.so
66
__pycache__
7-
zero
87
misc/*.sh
98
misc/*.md
109
.gdb_history

meson.build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ project('zero', 'cpp',
77
'warning_level=3'],
88
meson_version: '>=1.0.0')
99

10-
includes = include_directories('include')
10+
includes = include_directories('.')
1111

1212
compile_args = []
1313

14-
fmt_dep = dependency('fmt', version: '>=9.1.0')
14+
fmt_dep = dependency('fmt', version: '>=11.2.0')
1515
dependencies = []
1616
dependencies += fmt_dep
1717

18-
subdir('src')
18+
subdir('zero')
1919
subdir('tests')

tests/test_cmdline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "cmdline.hpp"
21
#include "fmt/core.h"
2+
#include "zero/cmdline.hpp"
33

44
using namespace std;
55
using namespace zero;
File renamed without changes.
File renamed without changes.
File renamed without changes.

include/expr.hpp renamed to zero/expr.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct Expr {
3434

3535
struct Binary : Expr {
3636
Binary(std::unique_ptr<Expr> left, Token op, std::unique_ptr<Expr> right)
37-
: left(std::move(left)), op(std::move(op)), right(std::move(right)){};
37+
: left(std::move(left)), op(std::move(op)), right(std::move(right)) {};
3838

3939
std::any accept(ExprVisitor &visitor) override {
4040
return visitor.visit_binary_expr(this);
@@ -46,7 +46,7 @@ struct Binary : Expr {
4646
};
4747

4848
struct Grouping : Expr {
49-
explicit Grouping(std::unique_ptr<Expr> expr) : expr(std::move(expr)){};
49+
explicit Grouping(std::unique_ptr<Expr> expr) : expr(std::move(expr)) {};
5050

5151
std::any accept(ExprVisitor &visitor) override {
5252
return visitor.visit_grouping_expr(this);
@@ -56,7 +56,7 @@ struct Grouping : Expr {
5656
};
5757

5858
struct Literal : Expr {
59-
explicit Literal(std::any value) : value(std::move(value)){};
59+
explicit Literal(std::any value) : value(std::move(value)) {};
6060
std::any accept(ExprVisitor &visitor) override {
6161
return visitor.visit_literal_expr(this);
6262
}
@@ -66,7 +66,7 @@ struct Literal : Expr {
6666

6767
struct Logical : Expr {
6868
Logical(std::unique_ptr<Expr> left, Token op, std::unique_ptr<Expr> right)
69-
: left(std::move(left)), op(std::move(op)), right(std::move(right)){};
69+
: left(std::move(left)), op(std::move(op)), right(std::move(right)) {};
7070

7171
std::any accept(ExprVisitor &visitor) override {
7272
return visitor.visit_logical_expr(this);
@@ -79,7 +79,7 @@ struct Logical : Expr {
7979

8080
struct Unary : Expr {
8181
Unary(Token op, std::unique_ptr<Expr> right)
82-
: op(std::move(op)), right(std::move(right)){};
82+
: op(std::move(op)), right(std::move(right)) {};
8383
std::any accept(ExprVisitor &visitor) override {
8484
return visitor.visit_unary_expr(this);
8585
}
@@ -89,7 +89,7 @@ struct Unary : Expr {
8989
};
9090

9191
struct Variable : Expr {
92-
explicit Variable(Token name) : name(std::move(name)){};
92+
explicit Variable(Token name) : name(std::move(name)) {};
9393

9494
std::any accept(ExprVisitor &visitor) override {
9595
return visitor.visit_variable_expr(this);
@@ -100,7 +100,7 @@ struct Variable : Expr {
100100

101101
struct Assign : Expr {
102102
Assign(Token name, std::unique_ptr<Expr> value)
103-
: name(std::move(name)), value(std::move(value)){};
103+
: name(std::move(name)), value(std::move(value)) {};
104104

105105
std::any accept(ExprVisitor &visitor) override {
106106
return visitor.visit_assign_expr(this);
File renamed without changes.

0 commit comments

Comments
 (0)