diff options
| author | eunhhu <[email protected]> | 2026-09-30 13:02:39 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-30 13:02:39 +0100 |
| commit | be1122a2e8bc720bd9473c130255eba46389c883 (patch) | |
| tree | 3d55ac2444c602516a0c160c02e541b1f20af788 /docs | |
| parent | c69682e1f1bc73e2b1f4a22b8eb3ec463be588e3 (diff) | |
| download | aup-be1122a2e8bc720bd9473c130255eba46389c883.tar.gz aup-be1122a2e8bc720bd9473c130255eba46389c883.zip | |
Let declared fields be apart by commas, as a value's are
A message's, a group's and a record's fields took a newline or a
semicolon after each, while a value's (Kept { id: 1, t: "a" }, send)
take commas, and the language's own examples declared
message { title: text, points: number } and to: { city: text, zip: u32 },
which did not compile. Now a comma, a newline or a semicolon ends a
declared field too (one after the last as well); without one it says
so.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/design/001-language-v0.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/design/001-language-v0.md b/docs/design/001-language-v0.md index 305838e..df67594 100644 --- a/docs/design/001-language-v0.md +++ b/docs/design/001-language-v0.md @@ -113,6 +113,7 @@ on edit { - `on 메시지 { }`는 메시지가 도착할 때 한 번 실행된다. 필드는 `메시지.필드`, 키는 `key`로만 쓴다. - 필드 타입은 `u32`, `number`(유한한 수), `bytes`, `text`(UTF-8)이고 가변 필드(bytes, text)는 몇 개든 어디에나 둘 수 있다. + 필드는 쉼표나 줄바꿈(또는 세미콜론)으로 나눈다. 메시지와 그룹과 레코드의 선언에서도, 값(`Kept { id: 1, t: "a" }`)에서와 같다. `input add = message { title: text, points: number }`. HTTP 호스트(`pure-serve`)는 JSON 본문의 객체를 이 필드들로 옮긴다. 도착한 메시지의 text가 UTF-8이 아니거나 수가 유한하지 않으면 그 이벤트는 실패한다. - 필드를 그룹으로 묶을 수 있다: `to: { city: text, zip: u32 }`. 그룹 안의 필드는 `메시지.그룹.필드`(`ship.to.city`)로 |
