Skip to content

Commit 9f8ae85

Browse files
docs: Fix separator mixing contradictions across docs (bearcove#59)
The primer, quiz, landing page, audit, and Claude skill docs all had stale references saying objects must use one separator style consistently. The parser spec (r[object.separators]) and the separator rules section already allowed mixing commas and newlines. Updated all five files to be consistent. Fixes bearcove#58.
1 parent 94f1a7c commit 9f8ae85

6 files changed

Lines changed: 10 additions & 239 deletions

File tree

crates/facet-styx/src/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ fn test_metadata_container_as_map_key() {
802802
#[derive(Debug, Facet)]
803803
#[facet(rename_all = "lowercase")]
804804
#[repr(u8)]
805+
#[allow(dead_code)]
805806
enum Decl {
806807
Select(Select),
807808
}

docs/audit-styx-parse.md

Lines changed: 0 additions & 216 deletions
This file was deleted.

docs/content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ an-object {
3434
can be
3535
multi line
3636
}
37-
or {inline style, with commas, never both}
37+
or {inline style, with commas}
3838
```
3939

4040
</div>

docs/content/guide/primer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Styx is a configuration language. Compared to JSON:
99

1010
- **Bare scalars** — quotes only when necessary
1111
- **Whitespace separation** — no `:` between keys and values
12-
- **Flexible separators** — commas or newlines, not both
12+
- **Flexible separators** — commas, newlines, or both
1313
- **Scalars are opaque** — the parser assigns no type information
1414
- **Two-dimensional values** — every value has a tag and a payload
1515

docs/content/tools/claude-skill.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,6 @@ styx lsp
376376

377377
## Common Mistakes
378378

379-
**Wrong**: Mixing separators in objects
380-
```styx
381-
// WRONG - can't mix newlines and commas
382-
server {
383-
host localhost, port 8080
384-
}
385-
```
386-
**Right**: Pick one separator style per block.
387-
388379
**Wrong**: Space around `=` in attributes
389380
```styx
390381
// WRONG

docs/src/quiz/quiz-questions.styx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,27 +181,22 @@ questions {
181181
```
182182
DOC
183183
options (
184-
{text "Yes", help "Objects must use one separator style consistently"}
185-
{text "No", correct true}
184+
{text "Yes", correct true}
185+
{text "No", help "Objects can mix commas and newlines freely"}
186186
)
187187
explanation <<DOC,markdown
188-
Objects must use either commas:
188+
Objects can use commas, newlines, or both as separators. You can mix them freely:
189189

190190
```styx
191-
{a 1, b 2, c 3}
191+
{a 1, b 2
192+
c 3}
192193
```
193194

194-
or newlines:
195+
is equivalent to:
195196

196197
```styx
197-
{
198-
a 1
199-
b 2
200-
c 3
201-
}
198+
{a 1, b 2, c 3}
202199
```
203-
204-
but never both.
205200
DOC
206201
}
207202
basics-duplicate-keys {

0 commit comments

Comments
 (0)