diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 12:52:38 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 12:52:38 -0600 |
| commit | e569552eb9766bc663871b6f3cb203a77e83503c (patch) | |
| tree | a3bd6f994a6c61aae2430e51de762880b002be03 /src/parser.c | |
| parent | 5d830cb1c04da59553d3af848340162a7be9fa58 (diff) | |
| download | zash-e569552eb9766bc663871b6f3cb203a77e83503c.tar.gz | |
C23: constexpr internal linkage, naming and trailing commas; clangd at C23
A constexpr at file scope has external linkage, so the CSI offsets and
CSI_MAX_CALLS now say static. The naming check gets the C23 spellings
wrap the check itself: typed constants keep the macro case, and a local
static constexpr table keeps the variable case. .clangd says -std=c23,
which it still did not, so the editor could not read constexpr at all.
Diffstat (limited to 'src/parser.c')
| -rw-r--r-- | src/parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser.c b/src/parser.c index 28ea5b6..0677b37 100644 --- a/src/parser.c +++ b/src/parser.c @@ -32,7 +32,7 @@ typedef enum tok_kind { T_RP, T_DSEMI, T_WORD, - T_REDIR + T_REDIR, } tok_kind; /** @@ -59,7 +59,7 @@ typedef enum keyword { KW_FUNCTION, KW_TIME, KW_DLBRACKET, /**< [[ */ - KW_DRBRACKET /**< ]] */ + KW_DRBRACKET, /**< ]] */ } keyword; /** @@ -186,7 +186,7 @@ typedef enum lex_mode { M_BRACE, /**< the word in ${x:-word}: ends at } */ M_BRACE_DQ, /**< the same, inside double quotes */ M_ARITH, /**< $(( ... )): ends at )) */ - M_HERE /**< here-document body: ends at end of input */ + M_HERE, /**< here-document body: ends at end of input */ } lex_mode; static void read_parts(pbuild *b, lex_mode mode, bool litq); |
