Cleanup.
This commit is contained in:
@@ -40,21 +40,8 @@ An ed implementation (mostly posix compliant) but with:
|
|||||||
- Internal buffer:
|
- Internal buffer:
|
||||||
- Super fast and memory efficient buffer implementation done.
|
- Super fast and memory efficient buffer implementation done.
|
||||||
- Loading from files/subshell commands done.
|
- Loading from files/subshell commands done.
|
||||||
- Most of the posix ed commands except regex ones done.
|
- Syntax highlighter and block parser system done.
|
||||||
|
- All ed addressing modes and block addressing done (also `%`).
|
||||||
### Modules
|
|
||||||
|
|
||||||
#### `Vase`
|
|
||||||
|
|
||||||
Vase is a avl piece tree like structure which handles loading, insertion, erasure, regex searching, regex replacing etc.
|
|
||||||
<br/>
|
|
||||||
done.
|
|
||||||
|
|
||||||
#### `hl`
|
|
||||||
|
|
||||||
`hl` is a stateful super fast syntax highlighter.
|
|
||||||
<br/>
|
|
||||||
mostly done.
|
|
||||||
|
|
||||||
#### `lsp`
|
#### `lsp`
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ struct Address {
|
|||||||
// it expands in theory to a Num,Num and so can be followed by chaining more adresses the ed way.
|
// it expands in theory to a Num,Num and so can be followed by chaining more adresses the ed way.
|
||||||
// this is handled and resolved by the handle function,
|
// this is handled and resolved by the handle function,
|
||||||
// the constuctor and resolve etc. are also only called in the handle function,
|
// the constuctor and resolve etc. are also only called in the handle function,
|
||||||
// i.e. handle is the only public facing API from this namespace & class for now.
|
|
||||||
//
|
//
|
||||||
// in case of any issue an instance of address_error(const char *) is thrown.
|
// in case of any issue an instance of address_error(const char *) is thrown.
|
||||||
|
|
||||||
@@ -46,6 +45,7 @@ struct Address {
|
|||||||
std::string re;
|
std::string re;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// extended types
|
||||||
struct Diagnostic { // #n# for diagnostic number n. (From lsp.)
|
struct Diagnostic { // #n# for diagnostic number n. (From lsp.)
|
||||||
uint16_t n;
|
uint16_t n;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ void BEd::handle(std::string_view cmd_, bool eof) {
|
|||||||
if (suffixes[cmd[i] - 'a'].has_value())
|
if (suffixes[cmd[i] - 'a'].has_value())
|
||||||
suffix = &(suffixes[cmd[i++] - 'a'].value());
|
suffix = &(suffixes[cmd[i++] - 'a'].value());
|
||||||
skip_space();
|
skip_space();
|
||||||
std::cout << i << " " << cmd << std::endl;
|
|
||||||
if (i < cmd.size())
|
if (i < cmd.size())
|
||||||
throw ed_error("Command error.");
|
throw ed_error("Command error.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,6 @@ uint64_t Address::resolve(BEd &ctx) {
|
|||||||
base
|
base
|
||||||
);
|
);
|
||||||
|
|
||||||
return result + offset;
|
return result;
|
||||||
}
|
}
|
||||||
}; // namespace bed::internal::address
|
}; // namespace bed::internal::address
|
||||||
|
|||||||
Reference in New Issue
Block a user