diff options
| -rw-r--r-- | .clang-format | 8 | ||||
| -rw-r--r-- | parse.c | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/.clang-format b/.clang-format index b80700c..35dc112 100644 --- a/.clang-format +++ b/.clang-format @@ -4,15 +4,13 @@ Language: Cpp Standard: Latest BasedOnStyle: LLVM -AccessModifierOffset: -4 AlignEscapedNewlines: DontAlign AlignTrailingComments: false -AllowShortBlocksOnASingleLine: Never AllowShortFunctionsOnASingleLine: None -AlwaysBreakTemplateDeclarations: Yes BreakStringLiterals: false ColumnLimit: 120 IndentWidth: 4 -KeepEmptyLinesAtTheStartOfBlocks: false -MaxEmptyLinesToKeep: 1 +KeepEmptyLines: + AtStartOfBlock: false + AtStartOfFile: false PointerAlignment: Left @@ -544,10 +544,12 @@ AstNode* parse_additive_expr(Parser* p) { AstNode* rhs = parse_multiplicative_expr(p); if (lhs->ty->base) { lhs = ast_new_binary_expr( - TokenKind_plus, lhs, ast_new_binary_expr(TokenKind_star, rhs, ast_new_int(type_sizeof(lhs->ty->base)))); + TokenKind_plus, lhs, + ast_new_binary_expr(TokenKind_star, rhs, ast_new_int(type_sizeof(lhs->ty->base)))); } else if (rhs->ty->base) { lhs = ast_new_binary_expr( - TokenKind_plus, ast_new_binary_expr(TokenKind_star, lhs, ast_new_int(type_sizeof(rhs->ty->base))), rhs); + TokenKind_plus, ast_new_binary_expr(TokenKind_star, lhs, ast_new_int(type_sizeof(rhs->ty->base))), + rhs); } else { lhs = ast_new_binary_expr(TokenKind_plus, lhs, rhs); } @@ -561,7 +563,8 @@ AstNode* parse_additive_expr(Parser* p) { } else { // a - b*sizeof(a) lhs = ast_new_binary_expr( - TokenKind_minus, lhs, ast_new_binary_expr(TokenKind_star, rhs, ast_new_int(type_sizeof(lhs->ty->base)))); + TokenKind_minus, lhs, + ast_new_binary_expr(TokenKind_star, rhs, ast_new_int(type_sizeof(lhs->ty->base)))); } } else { lhs = ast_new_binary_expr(TokenKind_minus, lhs, rhs); |
