# Compatibility and scope

This document defines the supported surface of `moon_tera` 0.3.0. It is the
source of truth when the README, examples, or roadmap are ambiguous.

## Supported

- Output expressions: `{{ expression }}`.
- Values: null, booleans, integers, floating-point numbers, strings, arrays,
  and insertion-ordered objects.
- Lookup: root variables, dotted object members, integer array indexes, and
  string-key object indexes.
- Operators: `+`, `-`, `*`, `/`, `%`, comparisons, `and`, `or`, and `not`.
- Statements: `if`, `elif`, `else`, `for` with an optional empty `else`
  branch, and `set`.
- Composition: `extends`, `block`, `super()`, and `include`.
- Built-ins: string, numeric, collection, escaping, URL, and JSON filters plus
  common `is` tests.
- Registry behavior: replacement on duplicate names, listing, removal,
  clearing, and whole-registry structural validation.
- Structural diagnostics through `Tera::try_render`.

## Deliberately unsupported in 0.3.0

- Macros, calls, imports, and namespaces.
- User-defined filters, tests, and functions.
- Automatic HTML escaping and safe-string tracking.
- File-system template loading and hot reload.
- Streaming output.
- Full upstream Tera error spans and source locations.
- Full Tera conformance.

Unknown tags are currently ignored by the parser for backward compatibility.
Applications should only use syntax listed in the supported section.

## Porting approach

The project reimplements a focused subset of Tera semantics in MoonBit. It does
not copy Rust source code. The ordered `Value` model, parser, evaluator, and
registry are adapted to MoonBit's own type system and multi-backend toolchain.
Upstream behavior is used as a semantic reference where a feature is declared
supported.
