From 7a2999d5fc8876ac4a0343b33f2fb8d01c98e683 Mon Sep 17 00:00:00 2001 From: Eric Elliott Date: Wed, 14 Jan 2026 18:02:58 -0800 Subject: [PATCH] Enhance SudoLang syntax documentation Updated SudoLang syntax cheat sheet with interface composition and disallowed keywords clarification. --- syntaxes/syntax-test.sudo | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/syntaxes/syntax-test.sudo b/syntaxes/syntax-test.sudo index e2aaab6..924a102 100644 --- a/syntaxes/syntax-test.sudo +++ b/syntaxes/syntax-test.sudo @@ -8,6 +8,13 @@ A quick cheat sheet for SudoLang syntax. ## Interfaces +type DateTime = Number(POSIX time, e.g. JS Date.now()) + +Meta { + id: String(cuid2) + createdAt: DateTime +} + DisplayTheme { mode: "light" | "dark" name: String @@ -20,7 +27,8 @@ UserPreferences { } User { - id: String + // spread can be used for interface composition + ...meta displayName preferences } @@ -189,7 +197,7 @@ processedData = rawData |> normalize |> filter |> sort ## Disallowed Keywords -Should generate a warning for disallowed keywords. +Should generate a warning for disallowed keywords, e.g. `class`, `extends`, and `super`. Favor composition over inheritance. class Foo extends Bar { constructor() {