2024-12-12 09:17:36 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2025-04-17 06:14:01 +08:00
|
|
|
From: jmorganca <jmorganca@gmail.com>
|
|
|
|
Date: Tue, 8 Apr 2025 19:43:40 -0700
|
|
|
|
Subject: [PATCH] maintain ordering for rules for grammar
|
2024-12-12 09:17:36 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
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
|
2025-10-03 05:47:10 +08:00
|
|
|
index db1f0b23..f4de7e34 100644
|
2024-12-12 09:17:36 +08:00
|
|
|
--- a/common/json-schema-to-grammar.cpp
|
|
|
|
+++ b/common/json-schema-to-grammar.cpp
|
2025-10-03 05:47:10 +08:00
|
|
|
@@ -308,7 +308,7 @@ private:
|
2025-02-27 12:34:44 +08:00
|
|
|
friend std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options);
|
2024-12-12 09:17:36 +08:00
|
|
|
std::function<json(const std::string &)> _fetch_json;
|
|
|
|
bool _dotall;
|
|
|
|
- std::map<std::string, std::string> _rules;
|
|
|
|
+ std::unordered_map<std::string, std::string> _rules;
|
|
|
|
std::unordered_map<std::string, json> _refs;
|
|
|
|
std::unordered_set<std::string> _refs_being_resolved;
|
|
|
|
std::vector<std::string> _errors;
|