source-map-node 0.0.1

compiler node with documentation and meta information
Documentation
  • Coverage
  • 0%
    0 out of 11 items documented0 out of 5 items with examples
  • Size
  • Source code size: 4.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 560.77 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • piot/source-map-node
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • piot

Source Map Node

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: u16
  • offset: u32
  • length: u16

Overview

  • Span: 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.

Installation

Add this to your Cargo.toml:

[dependencies]
source-map-node = "0.0.1"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright

Copyright (c) Peter Bjorklund. All rights reserved. https://github.com/swamp/swamp