| Crates.io | swamp-node |
| lib.rs | swamp-node |
| version | 0.1.10 |
| created_at | 2025-03-29 14:32:01.905064+00 |
| updated_at | 2025-03-29 14:32:01.905064+00 |
| description | compiler node with documentation and meta information |
| homepage | |
| repository | https://github.com/swamp/swamp |
| max_upload_size | |
| id | 1611356 |
| size | 4,866 |
A small Rust crate providing Span and Node structs for tracking source code locations, for use in compilers, linters, or language servers.
It uses compact representations:
FileId: u16offset: u32length: u16Span: Represents a contiguous region within a specific source file. It includes the file identifier (file_id), the starting byte offset (offset), and the length in bytes (length).Node: A simple wrapper around a Span, often used as a base for Abstract Syntax Tree (AST) nodes or other elements that need associated source location information.Add this to your Cargo.toml:
[dependencies]
swamp-node = "0.1.10"
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) Peter Bjorklund. All rights reserved. https://github.com/swamp/swamp