From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: ParthSareen Date: Wed, 11 Dec 2024 15:37:32 -0800 Subject: [PATCH] Maintain ordering for rules for grammar --- common/json-schema-to-grammar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/json-schema-to-grammar.cpp b/common/json-schema-to-grammar.cpp index 3ebcc3d9..30c28808 100644 --- a/common/json-schema-to-grammar.cpp +++ b/common/json-schema-to-grammar.cpp @@ -346,7 +346,7 @@ private: friend std::string build_grammar(const std::function & cb, const common_grammar_options & options); std::function _fetch_json; bool _dotall; - std::map _rules; + std::unordered_map _rules; std::unordered_map _refs; std::unordered_set _refs_being_resolved; std::vector _errors;