fix
This commit is contained in:
1 parent
79d560bb91
commit
32d4059d62
3 files changed
+13
-4
No files matched your search
@@ -121,6 +121,15 @@ util/rm-mac-geom # reset the app's saved window geometry
|
||||
otherwise the build fails on `F.<field>` being unresolved.
|
||||
- `dialect.swift` is generated — edits there are overwritten on the next
|
||||
`util/build-mac`. Change the source (`dialect.yml` / `components/`) instead.
|
||||
- **Validate `dialect.yml` after edits** (e.g. `ruby -ryaml -e 'YAML.load_file("dialect.yml")'`).
|
||||
Every should-branch label (`1. Upon each ...`) MUST end with a colon — the
|
||||
parser (`components/yml/ymlFun.swift`) blindly `dropLast()`s it, so a missing
|
||||
colon silently eats the label's last character in the generated `about`
|
||||
comment. Note the file can never pass a *strict* YAML parser: condition and
|
||||
reaction lines (under `if:` / `then:`) contain unquoted `: ` (e.g.
|
||||
`c.countText = "Count: '\(c.count)'"`), which standard YAML rejects. So treat
|
||||
a parser complaint pointing *inside* an `if:`/`then:` block as expected; any
|
||||
complaint elsewhere (like a missing branch-label colon) is a real bug.
|
||||
|
||||
## Swift 6
|
||||
|
||||
|
||||
+2
-2
@@ -23,12 +23,12 @@ RootComponent:
|
||||
then:
|
||||
c.count += 1
|
||||
countText:
|
||||
1. Upon each count change
|
||||
1. Upon each count change:
|
||||
if:
|
||||
c.recentField == F.count
|
||||
then:
|
||||
c.countText = "Count: '\(c.count)'"
|
||||
2. Upon launch
|
||||
2. Upon launch:
|
||||
if:
|
||||
c.recentField == F.didLaunch
|
||||
then:
|
||||
|
||||
@@ -215,7 +215,7 @@ func rootShouldResetCount(_ c: RootContext) -> RootContext {
|
||||
func rootShouldResetCountText(_ c: RootContext) -> RootContext {
|
||||
var c = c
|
||||
|
||||
/* 1. Upon each count chang */
|
||||
/* 1. Upon each count change */
|
||||
if
|
||||
c.recentField == F.count
|
||||
{
|
||||
@@ -224,7 +224,7 @@ func rootShouldResetCountText(_ c: RootContext) -> RootContext {
|
||||
return c
|
||||
}
|
||||
|
||||
/* 2. Upon launc */
|
||||
/* 2. Upon launch */
|
||||
if
|
||||
c.recentField == F.didLaunch
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user