Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/indent tests/indent: document quick-and-dirty ...
details: https://anonhg.NetBSD.org/src/rev/5188161f7512
branches: trunk
changeset: 1025160:5188161f7512
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 07 20:16:50 2021 +0000
description:
tests/indent: document quick-and-dirty approach of lex_number
diffstat:
tests/usr.bin/indent/token_ident.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r a906a66a8b32 -r 5188161f7512 tests/usr.bin/indent/token_ident.c
--- a/tests/usr.bin/indent/token_ident.c Sun Nov 07 19:25:26 2021 +0000
+++ b/tests/usr.bin/indent/token_ident.c Sun Nov 07 20:16:50 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token_ident.c,v 1.2 2021/11/07 19:25:26 rillig Exp $ */
+/* $NetBSD: token_ident.c,v 1.3 2021/11/07 20:16:50 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -77,3 +77,18 @@
int $ = jQuery; // just kidding
const char SYS$LOGIN[] = "$HOME";
#indent end
+
+
+/*
+ * Text the tokenizer for number constants.
+ *
+ * When the tokenizer reads a character that makes a token invalid (such as
+ * '0x') but may later be extended to form a valid token (such as '0x123'),
+ * indent does not care about this invalid prefix and returns it nevertheless.
+ */
+#indent input
+int unfinished_hex_prefix = 0x;
+double unfinished_hex_float = 0x123p;
+#indent end
+
+#indent run-equals-input -di0
Home |
Main Index |
Thread Index |
Old Index