78ef07cf0f
* Initial parser rewrite effort Lexer and Token cleanup, Parser started over * Greatly improved parser syntax * Reimplemented using declarations and variable placement parsing * Added back unions and structs * Added enums as well as mathematical expressions (+, -, *, /, <<, >>, &, |, ^) * Code style improvement * Implemented arrays and fixed memory issues * Fixed more memory issues in parser, reimplemented validator, evaluator and patterns * Fixed builtin types, arrays and reimplemented strings * Improved error messages * Made character a distinct type, used for chars and strings * Implemented padding, fixed arrays * Added bitfields * Added rvalue parsing, no evaluating yet * Added .idea folder to gitignore * Fixed build on MacOS * Added custom implementation of integral concept if not available * Rebased onto master * Fixed array variable decl crash * Added rvalues and dot syntax * Lower case all pattern language error messages * Fixed typo in variable name * Fixed bug where preprocessor would not ignore commented out directives * Reimplemented pointers * Fixed rebase issues
39 lines
845 B
C++
39 lines
845 B
C++
#pragma once
|
|
|
|
#include "lang/ast_node.hpp"
|
|
|
|
#include "views/view.hpp"
|
|
#include "lang/pattern_data.hpp"
|
|
|
|
#include "providers/provider.hpp"
|
|
|
|
#include <cstring>
|
|
#include <filesystem>
|
|
#include <thread>
|
|
|
|
#include "ImGuiFileBrowser.h"
|
|
#include "TextEditor.h"
|
|
|
|
namespace hex {
|
|
|
|
class ViewPattern : public View {
|
|
public:
|
|
explicit ViewPattern(std::vector<lang::PatternData*> &patternData);
|
|
~ViewPattern() override;
|
|
|
|
void drawMenu() override;
|
|
void drawContent() override;
|
|
|
|
private:
|
|
std::vector<lang::PatternData*> &m_patternData;
|
|
std::filesystem::path m_possiblePatternFile;
|
|
|
|
TextEditor m_textEditor;
|
|
imgui_addons::ImGuiFileBrowser m_fileBrowser;
|
|
|
|
void loadPatternFile(std::string path);
|
|
void clearPatternData();
|
|
void parsePattern(char *buffer);
|
|
};
|
|
|
|
} |