esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
Namespaces | Functions
parser.cpp File Reference
#include "parser.hpp"
#include <array>
#include <stdexcept>
#include <unordered_set>
Include dependency graph for parser.cpp:

Namespaces

namespace  protogen
 

Functions

void protogen::parse_into (const std::vector< Token > &tokens, const std::string &filename, ProtoFile &file)
 Parse one proto file's tokens, appending its enums/messages to file.
 
void protogen::resolve_types (ProtoFile &file)
 Resolve every field's type_name to FieldType::Enum / FieldType::Message (or a scalar).
 
bool protogen::is_scalar_type (const std::string &t)
 True for the 15 proto3 scalar keywords.
 
int protogen::wire_type_of (const ProtoField &f)
 Wire type number (0/1/2/5) for a resolved field.
 
bool protogen::is_packed (const ProtoField &f)
 True if a repeated field of this type is packed (honoring explicit flag).