From patchwork Tue Mar 6 20:28:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 26220 Received: (qmail 106636 invoked by alias); 6 Mar 2018 20:28:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 105550 invoked by uid 89); 6 Mar 2018 20:28:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=7389 X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.151.58) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Mar 2018 20:28:56 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway30.websitewelcome.com (Postfix) with ESMTP id CBCB92B8FD for ; Tue, 6 Mar 2018 14:28:54 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id tJCgeAycFhMYJtJCgerBj0; Tue, 06 Mar 2018 14:28:54 -0600 Received: from 174-29-60-18.hlrn.qwest.net ([174.29.60.18]:58756 helo=pokyo.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1etJCg-001QJ6-HU; Tue, 06 Mar 2018 14:28:54 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Formatting fixes in rust-exp.y Date: Tue, 6 Mar 2018 13:28:49 -0700 Message-Id: <20180306202849.8364-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1etJCg-001QJ6-HU X-Source-Sender: 174-29-60-18.hlrn.qwest.net (pokyo.Home) [174.29.60.18]:58756 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes I noticed a few formatting buglets in rust-exp.y: A couple of lines were too long, and a couple of parser rules did not follow the same formatting as the rest of the code. I'm checking this in as obvious. Tested by rebuilding. 2018-03-06 Tom Tromey * rust-exp.y: Formatting fixes. --- gdb/ChangeLog | 4 ++++ gdb/rust-exp.y | 19 +++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4eb6b9b971..a01206a3e3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-03-06 Tom Tromey + + * rust-exp.y: Formatting fixes. + 2018-03-06 Andrew Burgess * riscv-tdep.c (riscv_register_name): Remove target description diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y index dcc5fc78ed..f1dcecec96 100644 --- a/gdb/rust-exp.y +++ b/gdb/rust-exp.y @@ -425,7 +425,8 @@ expr: | array_expr | idx_expr | range_expr -| unop_expr /* Must precede call_expr because of ambiguity with sizeof. */ +| unop_expr /* Must precede call_expr because of ambiguity with + sizeof. */ | binop_expr | paren_expr | call_expr @@ -445,9 +446,9 @@ unit_expr: struct typed_val_int val; val.type - = language_lookup_primitive_type (current_parser->language (), - current_parser->arch (), - "()"); + = (language_lookup_primitive_type + (current_parser->language (), current_parser->arch (), + "()")); val.val = 0; $$ = ast_literal (val); } @@ -623,8 +624,8 @@ unop_expr: | '&' KW_MUT expr %prec UNARY { $$ = ast_unary (UNOP_ADDR, $3); } -| KW_SIZEOF '(' expr ')' %prec UNARY - { $$ = ast_unary (UNOP_SIZEOF, $3); } +| KW_SIZEOF '(' expr ')' %prec UNARY + { $$ = ast_unary (UNOP_SIZEOF, $3); } ; binop_expr: @@ -738,9 +739,7 @@ maybe_expr_list: ; paren_expr_list: - '(' - maybe_expr_list - ')' + '(' maybe_expr_list ')' { $$ = $2; } ; @@ -828,7 +827,7 @@ path_for_type: just_identifiers_for_type: IDENT - { $$ = ast_path ($1, NULL); } + { $$ = ast_path ($1, NULL); } | just_identifiers_for_type COLONCOLON IDENT { $$ = ast_path (rust_concat3 ($1->left.sval.ptr, "::",