Skip to content

Commit 7855588

Browse files
committed
Reformat code
1 parent 15a3c13 commit 7855588

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

.clang-format

-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Language: Cpp
33
BasedOnStyle: LLVM
44
AlwaysBreakTemplateDeclarations: Yes
55
ColumnLimit: 100
6-
PointerAlignment: Left
76
...

example/include/example/ast.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ struct variable {
1616

1717
struct call {
1818
char name;
19-
const expr* arg1;
20-
const expr* arg2;
19+
const expr *arg1;
20+
const expr *arg2;
2121
};
2222

2323
struct expr {

example/include/example/grammar.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ struct variable {
3131
struct call {
3232
using rule = sequence<range<'a', 'z'>, symbol<'('>, expr, symbol<','>, expr, symbol<')'>>;
3333

34-
constexpr static auto action(char fun, char l, ast::expr* e1, char comma, ast::expr* e2, char r) {
34+
constexpr static auto action(char fun, char l, ast::expr *e1, char comma, ast::expr *e2, char r) {
3535
return ast::call(fun, e1, e2);
3636
}
3737
};
3838

3939
struct expr {
4040
using rule = one_of<call, literal, variable>;
41-
using result = ast::expr*;
41+
using result = ast::expr *;
4242

4343
constexpr static auto action(ast::call call) { return new ast::expr(call); }
4444
constexpr static auto action(ast::literal literal) { return new ast::expr(literal); }
@@ -48,7 +48,7 @@ struct expr {
4848
struct top {
4949
using rule = sequence<expr, end>;
5050

51-
constexpr static auto action(ast::expr* expr, eof eof) { return expr; }
51+
constexpr static auto action(ast::expr *expr, eof eof) { return expr; }
5252
};
5353
} // namespace example::grammar
5454

include/percy/result.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class result {
4242

4343
constexpr explicit result(error error, input_span span) : value_(error), span_(span) {}
4444

45-
constexpr result(const failure& fail) : value_(error()), span_(fail.span()) {}
45+
constexpr result(const failure &fail) : value_(error()), span_(fail.span()) {}
4646

4747
constexpr bool is_success() const { return percy::holds_alternative<T>(value_); }
4848

include/percy/static_input.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class static_input {
99
std::size_t cursor_;
1010

1111
public:
12-
constexpr explicit static_input(const char* content, std::size_t position = 0)
12+
constexpr explicit static_input(const char *content, std::size_t position = 0)
1313
: content_(content), cursor_(position) {}
1414

1515
constexpr explicit static_input(std::string_view content, std::size_t position = 0)
@@ -30,7 +30,7 @@ class static_input {
3030
}
3131

3232
template <typename Result>
33-
constexpr static_input advanced_after(const Result& result) const {
33+
constexpr static_input advanced_after(const Result &result) const {
3434
return advanced_to(result.end());
3535
}
3636
};

tests/test_all.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ struct paren;
1010
struct round {
1111
std::vector<paren> parens;
1212
explicit round(std::vector<paren> parens) : parens(std::move(parens)) {}
13-
bool operator==(const round& other) const { return parens == other.parens; }
13+
bool operator==(const round &other) const { return parens == other.parens; }
1414
};
1515

1616
struct curly {
1717
std::vector<paren> parens;
1818
explicit curly(std::vector<paren> parens) : parens(std::move(parens)) {}
19-
bool operator==(const curly& other) const { return parens == other.parens; }
19+
bool operator==(const curly &other) const { return parens == other.parens; }
2020
};
2121

2222
struct paren {
2323
percy::variant<round, curly> concrete;
2424
explicit paren(round r) : concrete(r) {}
2525
explicit paren(curly c) : concrete(c) {}
26-
bool operator==(const paren& other) const { return concrete == other.concrete; }
26+
bool operator==(const paren &other) const { return concrete == other.concrete; }
2727
};
2828
} // namespace ast
2929

0 commit comments

Comments
 (0)