docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
19fcf60599
commit
a476ec7976
79 changed files with 481 additions and 355 deletions
|
|
@ -19,7 +19,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program FirstIsDigit {
|
||||
var entry: string = "7up"
|
||||
let entry: string = "7up"
|
||||
|
||||
handler Check phase Update {
|
||||
let c = Text.char_at(entry, 0)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program Greeting {
|
||||
var name: string = "world"
|
||||
let name: string = "world"
|
||||
|
||||
handler Build phase Update {
|
||||
let line = Text.concat("hello ", name) # "hello world"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program Filter {
|
||||
var line: string = "error: disk full"
|
||||
let line: string = "error: disk full"
|
||||
|
||||
handler Scan phase Update {
|
||||
if Text.contains(line, "error") {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program IsImage {
|
||||
var filename: string = "hero.png"
|
||||
let filename: string = "hero.png"
|
||||
|
||||
handler Classify phase Update {
|
||||
let png = Text.ends_with(filename, ".png") # true
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program Guess {
|
||||
var answer: string = "swordfish"
|
||||
var attempt: string = "swordfish"
|
||||
let answer: string = "swordfish"
|
||||
let attempt: string = "swordfish"
|
||||
|
||||
handler Check phase Update {
|
||||
if Text.equals(attempt, answer) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program ScoreLabel {
|
||||
var score: int = 1500
|
||||
let score: int = 1500
|
||||
|
||||
handler Build phase Update {
|
||||
let label = Text.concat("score: ", Text.from_int(score))
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program KeyValue {
|
||||
var pair: string = "hp=42"
|
||||
let pair: string = "hp=42"
|
||||
|
||||
handler Parse phase Update {
|
||||
let eq = Text.index_of(pair, "=") # 2
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program NameWidth {
|
||||
var label: string = "player one"
|
||||
let label: string = "player one"
|
||||
|
||||
handler Draw phase Render {
|
||||
let width = Text.length(label) * 6 # 6 px per glyph
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program FirstWord {
|
||||
var line: string = "hello world"
|
||||
let line: string = "hello world"
|
||||
|
||||
handler Split phase Update {
|
||||
let space = Text.index_of(line, " ") # 5
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program Command {
|
||||
var input: string = "/say hello"
|
||||
let input: string = "/say hello"
|
||||
|
||||
handler Parse phase Update {
|
||||
if Text.starts_with(input, "/say ") {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program ParseSpeed {
|
||||
var typed: string = "3.2"
|
||||
let typed: string = "3.2"
|
||||
|
||||
handler Apply phase Update {
|
||||
let speed = Text.to_float(typed) # 3.2
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Parameters:
|
|||
|
||||
```ludic
|
||||
program ParseAmount {
|
||||
var typed: string = "250"
|
||||
let typed: string = "250"
|
||||
|
||||
handler Apply phase Update {
|
||||
let gold = Text.to_int(typed) # 250
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue