Stage 2: render pipeline and UI toolkit over gpu/platform. Stage 3: schema registry, asset pipeline + runtime loader, scene graph and ECS. Stage 4: editor — docking, inspector, scene/game views, play mode, asset browser, console, profiler; 4.5 adds the 3D foundation (mixed 2D/3D spaces, meshes, depth). Stage 5: Aego Script — compiler (lexer/parser/types/resolver/checker/asm/compiler), bytecode with verifier and register VM, instance runtime, stdlib, native bindings, and editor/CLI integration (aego run/edit/check/test/dump).
66 lines
881 B
Plaintext
66 lines
881 B
Plaintext
package syntax
|
|
|
|
import (
|
|
"aego/log"
|
|
"aego/math"
|
|
)
|
|
|
|
const Limit int = 1_000
|
|
const Ratio = .5
|
|
const Name = "syn\ttax"
|
|
|
|
enum Mode {
|
|
Off
|
|
On
|
|
}
|
|
|
|
type Pair struct {
|
|
A int
|
|
B float
|
|
}
|
|
|
|
func add(a int, b int) int {
|
|
return a + b
|
|
}
|
|
|
|
@hide
|
|
@former("OldSyntax")
|
|
script Syntax {
|
|
@export(min=-1, max=10, unit="m", display="Count")
|
|
var Count int = 3
|
|
|
|
var items []int
|
|
var pair Pair
|
|
var mode Mode
|
|
|
|
func Ready() {
|
|
pair = Pair{A: 1, B: 2.5}
|
|
items = append(items, add(1, 2))
|
|
for i := 0; i < len(items); i++ {
|
|
items[i] *= 2
|
|
}
|
|
for Count > 0 {
|
|
Count--
|
|
}
|
|
for {
|
|
break
|
|
}
|
|
switch mode {
|
|
case Mode.Off, Mode.On:
|
|
log.Info("mode")
|
|
default:
|
|
return
|
|
}
|
|
if !(Count >= 1 && pair.A != 0) || Ratio < 1e3 {
|
|
var x float = -math.Abs(-1.5)
|
|
x += float(Count) * 0x1f
|
|
} else if node.Has<SpriteRenderer>() {
|
|
{
|
|
continue
|
|
}
|
|
} else {
|
|
mode = Mode.On
|
|
}
|
|
}
|
|
}
|