1// Copyright 2024 The Chromium Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#include "{{template_name}}.h" 6 7namespace domatolpm::{{template_name}} { 8 9bool handle_fuzzer(domatolpm::Context* ctx, const domatolpm::generated::{{template_name}}::fuzzcase& fuzzcase) { 10{% for grammar in grammar_elements %} 11{% if grammar['is_str'] %} 12 ctx->GetBuilder()->append("{{grammar['content']}}"); 13{% else %} 14 domatolpm::{{grammar['proto_type']}}::handle_fuzzcase(ctx, fuzzcase.{{grammar['proto_field_name']}}()); 15{% endif %} 16{% endfor %} 17 return true; 18} 19 20} 21