]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.c
Enable corrector by default
[xonotic/gmqcc.git] / parser.c
index e93c7928e76375d189ff0dd3debad579be76e300..aa3c38e5ae6d7eb434b6b6b591d2adef9832a814 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -75,8 +75,8 @@ typedef struct {
     ht *typedefs;
 
     /* same as above but for the spelling corrector */
-    ht       *correct_variables;
-    size_t ***correct_variables_score;  /* vector of vector of size_t* */
+    correct_trie_t  **correct_variables;
+    size_t         ***correct_variables_score;  /* vector of vector of size_t* */
 
     /* not to be used directly, we use the hash table */
     ast_expression **_locals;
@@ -1999,7 +1999,7 @@ static void parser_enterblock(parser_t *parser)
     vec_push(parser->_block_ctx, parser_ctx(parser));
 
     /* corrector */
-    vec_push(parser->correct_variables, util_htnew(PARSER_HT_SIZE));
+    vec_push(parser->correct_variables, correct_trie_new());
     vec_push(parser->correct_variables_score, NULL);
 }