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
45 public:
50 explicit AnimCodeParser(gsl::not_null<const TextFormatter *> format, gsl::not_null<const UserDiagnostics *> diag)
51 : format_{format}, diag_{diag}
52 {
53 }
54
78 const std::filesystem::path &c_file_path,
79 const std::string &callback_func_name,
80 const DynamicCasedName &tileset_cased_name,
81 bool porytiles_managed) const;
82
83 private:
84 const TextFormatter *format_;
85 const UserDiagnostics *diag_;
86};
87
88} // 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.