Porytiles
Loading...
Searching...
No Matches
anim_code_parser.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <filesystem>
4#include <map>
5#include <string>
6
7#include "gsl/pointers"
8
14
15namespace porytiles {
16
44 public:
51 explicit AnimCodeParser(gsl::not_null<const TextFormatter *> format, gsl::not_null<const UserDiagnostics *> diag)
52 : format_{format}, diag_{diag}
53 {
54 }
55
81 const std::filesystem::path &c_file_path,
82 const std::string &callback_func_name,
83 const DynamicCasedName &tileset_cased_name,
84 bool porytiles_managed) const;
85
86 private:
87 const TextFormatter *format_;
88 const UserDiagnostics *diag_;
89};
90
91} // namespace porytiles
Parses C code to extract tileset animation parameters using callback chain discovery.
ChainableResult< std::map< DynamicCasedName, AnimParams > > parse_from_callback(const std::filesystem::path &c_file_path, const std::string &callback_func_name, const DynamicCasedName &tileset_cased_name, bool porytiles_managed) const
Parses animation parameters by following the callback chain.
AnimCodeParser(gsl::not_null< const TextFormatter * > format, gsl::not_null< const UserDiagnostics * > diag)
Constructs an AnimCodeParser with a text formatter for error messages.
A result type that maintains a chainable sequence of errors for debugging and error reporting.
A smart string wrapper that preserves word structure for lossless case format conversion.
Abstract base class for applying text styling with context-aware formatting.
Abstract class for structured error reporting and diagnostic output.