aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-03-06 13:27:12 -0700
committerTom Tromey <tom@tromey.com>2018-03-06 13:27:12 -0700
commitd8344f3d05565ae24a39a8f02533c396b544a780 (patch)
tree573322566d21cd5876ee2fdd6985c3c3b8f4eae9 /gdb
parent770aa8a3d3da978a35520af5f205ab2d8a5371a0 (diff)
downloadgdb-d8344f3d05565ae24a39a8f02533c396b544a780.zip
gdb-d8344f3d05565ae24a39a8f02533c396b544a780.tar.gz
gdb-d8344f3d05565ae24a39a8f02533c396b544a780.tar.bz2
Formatting fixes in rust-exp.y
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 <tom@tromey.com> * rust-exp.y: Formatting fixes.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/rust-exp.y19
2 files changed, 13 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4eb6b9b..a01206a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-03-06 Tom Tromey <tom@tromey.com>
+
+ * rust-exp.y: Formatting fixes.
+
2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
* riscv-tdep.c (riscv_register_name): Remove target description
diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y
index dcc5fc7..f1dcece 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, "::",