Add marks and regex addressing systems

- Hook up parser to buffer edits.
- Other minor fixes.
This commit is contained in:
2026-08-22 15:01:48 +01:00
parent 2a903f761a
commit bea8ff18c0
15 changed files with 357 additions and 73 deletions
+2 -21
View File
@@ -69,17 +69,8 @@ struct Token {
};
struct ParseEvent {
std::string_view name;
enum T : uint8_t {
Opening,
Closing,
SymbolDef,
Symbol
} ev_type;
uint8_t type; // type.
ParseEvent(T t) : ev_type(t) {}
ParseEvent(T e_t, std::string_view s, uint8_t type) : name(s), ev_type(e_t), type(type) {}
uint8_t closing;
ParseEvent(uint8_t t) : closing(t) {}
};
struct Language {
@@ -90,16 +81,6 @@ struct Language {
std::function<void(void *)> destroy;
};
struct Symbol {
uint32_t definition;
uint16_t reference_count;
uint8_t type;
uint8_t len;
// first chars of count len, padded to 4 bytes.
// then a set of references. 32bit
// references later as modifying at end is faster than shifting the name.
};
struct ParseState {
static constexpr uint64_t BRANCH_BIT = 1ull << 63;
static constexpr uint64_t LINES_MASK = ~BRANCH_BIT;
-9
View File
@@ -5,15 +5,6 @@
#include "tries.h"
namespace bed::internal::syntax::ruby {
enum struct ScopeTypes : uint8_t {
None,
Comment,
Method,
Class,
Module,
Block
};
struct alignas(2) RubyState {
struct RubyInternalState {
uint16_t brace_level;