DriftScript
Documentation

Reference

Syntax

Every keyword, primitive, annotation and unit suffix, generated from the compiler token table.

Generated from the compiler token table, which is the file that decides what a keyword is. A highlighter or a reference that drifted from it would still look right and be wrong, which is exactly the failure worth a generator rather than a review.

Keywords 55

let var fn task await spawn state become enter data enum event match import from if else return while for in break continue on emit scope mut as component entity system prefab require reads writes uses update at after query true false bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 String Entity

Soft keywords 23

state component entity system prefab require reads writes uses update at become enter task data from on scope match as in emit after

Primitives 13

bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 String Entity

Annotations 9

@pure @deterministic @hot @replicated @aiTool @aiContext @editor @substance @reaction

Unit suffixes 17

degC kPa mol deg rad ms Hz kJ MJ kg Pa J K W g m s

A soft keyword is highlighted everywhere it appears, which is over-eager and is the cheaper half of a trade the language states at its own token table: a flat set cannot express a keyword whose meaning depends on where it sits, which is why this language has no contextual keywords.