summaryrefslogtreecommitdiff
path: root/sys/dev/microcode
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2021-10-25 00:54:37 +0000
committerrillig <rillig@NetBSD.org>2021-10-25 00:54:37 +0000
commit23b1187f7313bf110d9de82bb7660325d72a771f (patch)
treefdc151b0b00a62c82ba2b038e7e9aa8d53be6895 /sys/dev/microcode
parent38b68a2e31ce042af56f8b0b436c94d838280774 (diff)
indent: split type token_type into 3 separate types
Previously, token_type was used for 3 different purposes: 1. symbol types from the lexer 2. symbol types on the parser stack 3. kind of control statement for 'if (expr)' and similar statements Splitting the 41 constants into separate types makes it immediately clear that the parser stack never handles comments, preprocessing lines, newlines, form feeds, the inner structure of expressions. Previously, the constant switch_expr was especially confusing since it was used for 3 different purposes: when returned from lexi, it represented the keyword 'switch', in the parser stack it represented 'switch (expr)', and it was used for a statement head as well. The only overlap between the lexer symbols and the parser symbols are '{' and '}', and the keywords 'do' and 'else'. To increase confusion, the constants of the previous token_type were in apparently random order and before 2021, they had cryptic, highly abbreviated names. No functional change.
Diffstat (limited to 'sys/dev/microcode')
0 files changed, 0 insertions, 0 deletions