Skip to content

Commit 842a259

Browse files
committed
Update .clang-format
1 parent c7e523a commit 842a259

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.clang-format

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
---
22
BasedOnStyle: LLVM
3+
4+
AlignAfterOpenBracket: DontAlign
5+
AllowAllArgumentsOnNextLine: false
6+
AllowShortBlocksOnASingleLine: Empty
37
AllowShortCaseLabelsOnASingleLine: true
48
AllowShortFunctionsOnASingleLine: None
59
AllowShortIfStatementsOnASingleLine: true
10+
BinPackArguments: false
611
ColumnLimit: 120
7-
IndentWidth: 2
812
IndentCaseLabels: true
13+
IndentWidth: 2
14+
PenaltyBreakBeforeFirstCallParameter: 0
915
PointerAlignment: Left
1016
SpaceAfterCStyleCast: true
1117
SpaceBeforeParens: ControlStatements

src/parser.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ parser_T* parser_init(lexer_T* lexer) {
2020

2121
token_T* parser_consume(parser_T* parser, int type) {
2222
if (parser->token->type != type) {
23-
printf("[Parser]: Unexpected token: '%s', was expected: '%s'\n", token_to_string(parser->token),
24-
token_type_string(type));
23+
printf("[Parser]: Unexpected token: '%s', was expected: '%s'\n",
24+
token_to_string(parser->token),
25+
token_type_string(type));
2526
exit(1);
2627
}
2728

src/token.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,16 @@ char* token_to_string(token_T* token) {
7070

7171
char* escaped = escape_newlines(token->value);
7272

73-
sprintf(string, template, type_string, escaped, token->range->start, token->range->end, token->start->line,
74-
token->start->column, token->end->line, token->end->column);
73+
sprintf(string,
74+
template,
75+
type_string,
76+
escaped,
77+
token->range->start,
78+
token->range->end,
79+
token->start->line,
80+
token->start->column,
81+
token->end->line,
82+
token->end->column);
7583

7684
free(escaped);
7785

0 commit comments

Comments
 (0)