feat(parser): add platform-specific parsers and argument conventions

Implement platform-specific parsers for Windows, Linux, and macOS
Add GNU argument convention implementations
Create fake parser for testing purposes
Update CMakeLists to include new headers
This commit is contained in:
2025-10-03 23:56:54 +04:00
parent ef0a0c06f8
commit ebbf3983de
10 changed files with 190 additions and 23 deletions

View File

@@ -0,0 +1,29 @@
#pragma once
#ifndef FAKE_PARSER_HPP
#define FAKE_PARSER_HPP
#include <argument_parser.hpp>
#include <crt_externs.h>
#include <initializer_list>
#include <string>
namespace argument_parser {
class fake_parser : public base_parser {
public:
fake_parser(std::string const& program_name, std::vector<std::string> const& arguments) {
this->program_name = program_name;
parsed_arguments = arguments;
}
fake_parser(std::string const& program_name, std::vector<std::string>&& arguments) {
this->program_name = program_name;
parsed_arguments = std::move(arguments);
}
fake_parser(std::string const& program_name, std::initializer_list<std::string> const& arguments) :
fake_parser(program_name, std::vector<std::string>(arguments)) {}
};
}
#endif