Expand description
Hermes compiler support library (Rust port).
Re-exports§
pub use heap_size::HeapSize;
Modules§
- buffer
- Source buffer primitives: a NUL-terminated byte buffer and a named wrapper.
- deque
- diag
- Diagnostic types, handler trait, collecting handler, output options, and
warning categories. Port of
SourceErrorManagerdiagnostic infrastructure. - heap_
size - json_
emitter - Port of
hermes::JSONEmitter(include/hermes/Support/JSONEmitter.{h,cpp}) plus thenumberToStringhelper it relies on (lib/Support/Conversions.cpp). - line_
index - Line-start index for a source buffer: maps byte offsets to 1-based
(line, column) and back. Column is the byte distance from the line start,
matching LLVH
SourceMgrso that caret rendering is byte-compatible. - location
- Offset-based source locations (Rust analog of
llvh::SMLoc). - manager
SourceErrorManager: owns source buffers, resolves locations, and dispatches diagnostics. This module covers buffer registration, names, virtual buffers, source-URL storage, and the central diagnostic emit pipeline: handler storage, message counts, error limit, warning categories, and message buffering/coalescing. Port ofhermes::SourceErrorManager.- persistent_
scoped_ map - Port of
hermes::PersistentScopedMap(include/hermes/ADT/PersistentScopedMap.h): a scoped hash table similar tohermes::ScopedHashTable, but scopes can be retained and reactivated after they have been popped from the table. - render
- Byte-compatible source-line + caret rendering. Port of
SourceErrorManager::buildSourceAndCaretLineandprintDiagnosticHelper. - utf8
- WTF-8 / UTF-8 → UTF-16 codec helpers, faithfully copied from the subset of
hermes_parser::utf8(itself ported frominclude/hermes/Support/UTF8.h) that is needed byJSONEmitterand the forthcoming AST-dumper port.