Home

Code Location

This is a type used in Stencila Schema for pointing to a location within source code.

It exists to support diagnostics, references, provenance, and tooling integrations that need to connect document nodes back to specific code spans. By representing locations structurally, Stencila can preserve this information across serialization and execution workflows.

Key properties identify the source, range, and positional information for the code span.

Properties

The CodeLocation type has these properties:

NameDescriptionTypeInherited from
sourceThe source of the code, a file path, label or URL.String-
startLineThe 0-based index if the first line on which the error occurred.UnsignedInteger-
startColumnThe 0-based index if the first column on which the error occurred.UnsignedInteger-
endLineThe 0-based index if the last line on which the error occurred.UnsignedInteger-
endColumnThe 0-based index if the last column on which the error occurred.UnsignedInteger-
idThe identifier for this item.StringEntity

Related

The CodeLocation type is related to these types:

Bindings

The CodeLocation type is represented in:


This documentation was generated from CodeLocation.yaml by docs_types.rs.

© 2026 Stencila