diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 17:18:46 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 17:18:46 +0200 |
commit | 65254128e105903b6b470c6b4bb4729f56cf81bc (patch) | |
tree | 8f0e61f94053f49428531f0d8cd6e8d1abfcdb2a /conf/cf-lex.l | |
parent | 1a92ee9d4df265018c0344064019f53bc3afce3a (diff) | |
parent | 702c04fbef222e802ca4dfac645dc75ede522db6 (diff) |
Merge commit '702c04fbef222e802ca4dfac645dc75ede522db6' into haugesund
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r-- | conf/cf-lex.l | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l index e84e1d9d..11bcdb18 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -709,10 +709,7 @@ cf_lex_symbol(const char *data) struct symbol *sym = cf_get_symbol(data); cf_lval.s = sym; - if (sym->class != SYM_VOID) - return CF_SYM_KNOWN; - - /* Is it a keyword? */ + /* Is it a keyword? Prefer the keyword. */ struct keyword *k = HASH_FIND(kw_hash, KW, data); if (k) { @@ -725,9 +722,11 @@ cf_lex_symbol(const char *data) } } - /* OK, undefined symbol */ - cf_lval.s = sym; - return CF_SYM_UNDEFINED; + /* OK, only a symbol. */ + if (sym->class == SYM_VOID) + return CF_SYM_UNDEFINED; + else + return CF_SYM_KNOWN; } static void |