Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/indent indent: document the funcname token
details: https://anonhg.NetBSD.org/src/rev/eb2172406507
branches: trunk
changeset: 375877:eb2172406507
user: rillig <rillig%NetBSD.org@localhost>
date: Thu May 18 08:09:28 2023 +0000
description:
indent: document the funcname token
diffstat:
tests/usr.bin/indent/opt_pcs.c | 15 ++++++++++++++-
usr.bin/indent/indent.h | 4 ++--
2 files changed, 16 insertions(+), 3 deletions(-)
diffs (44 lines):
diff -r e5798aef6e73 -r eb2172406507 tests/usr.bin/indent/opt_pcs.c
--- a/tests/usr.bin/indent/opt_pcs.c Thu May 18 07:13:05 2023 +0000
+++ b/tests/usr.bin/indent/opt_pcs.c Thu May 18 08:09:28 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_pcs.c,v 1.15 2023/05/15 20:50:37 rillig Exp $ */
+/* $NetBSD: opt_pcs.c,v 1.16 2023/05/18 08:09:28 rillig Exp $ */
/*
* Tests for the options '-pcs' and '-npcs'.
@@ -110,3 +110,16 @@ int sizeof_expr = sizeof 0;
int offset = offsetof(struct s, member);
int offset = offsetof(struct s, member);
//indent end
+
+
+//indent input
+int unary = +call();
+int binary = 1 + call();
+//indent end
+
+//indent run-equals-input -npcs -di0
+
+//indent run -pcs -di0
+int unary = +call ();
+int binary = 1 + call ();
+//indent end
diff -r e5798aef6e73 -r eb2172406507 usr.bin/indent/indent.h
--- a/usr.bin/indent/indent.h Thu May 18 07:13:05 2023 +0000
+++ b/usr.bin/indent/indent.h Thu May 18 08:09:28 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: indent.h,v 1.149 2023/05/18 06:01:39 rillig Exp $ */
+/* $NetBSD: indent.h,v 1.150 2023/05/18 08:09:28 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -94,7 +94,7 @@ typedef enum lexer_symbol {
lsym_sizeof,
lsym_offsetof,
lsym_word, /* identifier, constant or string */
- lsym_funcname,
+ lsym_funcname, /* name of a function being defined */
lsym_do,
lsym_else,
lsym_for,
Home |
Main Index |
Thread Index |
Old Index