Metadata and source location introspection.
Functions
source core
fn (lazy var: Any): Source
Get source file and position information for var.
Example
src source(::hot::str/split)
// src.file = "src/myapp/handlers.hot"
// src.line = 42
// src.column = 1
get
fn (lazy var: Any): Any
Get metadata attached to var.
Example
// A function's meta map, here with its doc and core keys
info ::hot::meta/get(::hot::str/split)
info.core
Types
Source
Source type {
file: Str?,
line: Int?,
column: Int?,
position: Int?
}
Source location information for a variable or function.
Example
src source(my-function)
src.file // "src/myapp/handlers.hot"
src.line // 42
src.column // 1
src.position // 1024 (byte offset)