diff --git a/usr.bin/indent/lexi.c b/usr.bin/indent/lexi.c index 7d71ecd5cc19..1a5938689e26 100644 --- a/usr.bin/indent/lexi.c +++ b/usr.bin/indent/lexi.c @@ -193,6 +193,7 @@ lexi(struct parser_state *state) /* Scan an alphanumeric token */ if (isalnum((unsigned char)*buf_ptr) || + *buf_ptr == '_' || *buf_ptr == '$' || (buf_ptr[0] == '.' && isdigit((unsigned char)buf_ptr[1]))) { /* * we have a character or number @@ -222,7 +223,7 @@ lexi(struct parser_state *state) else while (isalnum((unsigned char)*buf_ptr) || *buf_ptr == BACKSLASH || - *buf_ptr == '_') { + *buf_ptr == '_' || *buf_ptr == '$') { /* fill_buffer() terminates buffer with newline */ if (*buf_ptr == BACKSLASH) { if (*(buf_ptr + 1) == '\n') { diff --git a/usr.bin/indent/tests/float.0 b/usr.bin/indent/tests/float.0 index ec441ec8870f..ea146e23d8a7 100644 --- a/usr.bin/indent/tests/float.0 +++ b/usr.bin/indent/tests/float.0 @@ -4,4 +4,5 @@ void t(void) { double y[] = {0x1P+9F, 0.3, .1, 1.2f, 0xa.p01f, 3.14f, 2.L}; int z = 0b0101; DO_NOTHING; + x._y = 5; } diff --git a/usr.bin/indent/tests/float.0.stdout b/usr.bin/indent/tests/float.0.stdout index 679bbfecfb18..891b03648655 100644 --- a/usr.bin/indent/tests/float.0.stdout +++ b/usr.bin/indent/tests/float.0.stdout @@ -6,4 +6,5 @@ t(void) double y[] = {0x1P+9F, 0.3, .1, 1.2f, 0xa.p01f, 3.14f, 2.L}; int z = 0b0101; DO_NOTHING; + x._y = 5; }