2024-10-25 02:04:11 -07:00
|
|
|
// This file was generated automatially by gencpp's unreal.cpp (See: https://github.com/Ed94/gencpp)
|
2024-10-21 19:39:40 -07:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef __clang__
|
2024-10-27 18:44:34 -07:00
|
|
|
# pragma clang diagnostic push
|
|
|
|
# pragma clang diagnostic ignored "-Wunused-const-variable"
|
|
|
|
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
|
|
|
# pragma clang diagnostic ignored "-Wswitch"
|
|
|
|
# pragma clang diagnostic ignored "-Wunused-variable"
|
|
|
|
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
|
|
|
# pragma clang diagnostic ignored "-Wvarargs"
|
|
|
|
# pragma clang diagnostic ignored "-Wunused-function"
|
2024-12-15 11:14:02 -08:00
|
|
|
# pragma clang diagnostic ignored "-Wbraced-scalar-init"
|
|
|
|
# pragma clang diagnostic ignored "-W#pragma-messages"
|
|
|
|
# pragma clang diagnostic ignored "-Wstatic-in-inline"
|
2024-10-21 19:39:40 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __GNUC__
|
2024-10-27 18:44:34 -07:00
|
|
|
# pragma GCC diagnostic push
|
|
|
|
# pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
|
|
|
# pragma GCC diagnostic ignored "-Wcomment"
|
|
|
|
# pragma GCC diagnostic ignored "-Wswitch"
|
|
|
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
2024-10-21 19:39:40 -07:00
|
|
|
#endif
|
|
|
|
|
2024-10-25 02:04:11 -07:00
|
|
|
#include "gen.hpp"
|
|
|
|
|
2024-10-21 19:39:40 -07:00
|
|
|
GEN_NS_BEGIN
|
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
#pragma region Scanner
|
|
|
|
|
2024-10-21 19:39:40 -07:00
|
|
|
// This is a simple file reader that reads the entire file into memory.
|
|
|
|
// It has an extra option to skip the first few lines for undesired includes.
|
|
|
|
// This is done so that includes can be kept in dependency and component files so that intellisense works.
|
2024-12-15 11:14:02 -08:00
|
|
|
Code scan_file( char const* path );
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
CodeBody parse_file( const char* path );
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
// The follow is basic support for light csv parsing (use it as an example)
|
|
|
|
// Make something robust if its more serious.
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
typedef struct CSV_Column CSV_Column;
|
|
|
|
struct CSV_Column {
|
|
|
|
CSV_Object ADT;
|
|
|
|
Array(ADT_Node) Content;
|
2024-10-21 19:39:40 -07:00
|
|
|
};
|
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
typedef struct CSV_Columns2 CSV_Columns2;
|
|
|
|
struct CSV_Columns2 {
|
|
|
|
CSV_Object ADT;
|
|
|
|
Array(ADT_Node) Col_1;
|
|
|
|
Array(ADT_Node) Col_2;
|
|
|
|
};
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
CSV_Column parse_csv_one_column(AllocatorInfo allocator, char const* path);
|
|
|
|
CSV_Columns2 parse_csv_two_columns(AllocatorInfo allocator, char const* path);
|
2024-10-21 19:39:40 -07:00
|
|
|
|
2024-12-15 11:14:02 -08:00
|
|
|
#pragma endregion Scanner
|
2024-10-21 19:39:40 -07:00
|
|
|
|
|
|
|
GEN_NS_END
|
|
|
|
|
|
|
|
#ifdef __clang__
|
2024-10-27 18:44:34 -07:00
|
|
|
# pragma clang diagnostic pop
|
2024-10-21 19:39:40 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __GNUC__
|
2024-10-27 18:44:34 -07:00
|
|
|
# pragma GCC diagnostic pop
|
2024-10-21 19:39:40 -07:00
|
|
|
#endif
|