Skip to content

feat(parser)!: assign with 이에요 like a declaration, remove 넣다 - #53

Merged
Solype merged 2 commits into
mainfrom
feat/reassign-with-itis
Nov 10, 2026
Merged

Solype merged 2 commits into
mainfrom
feat/reassign-with-itis

Conversation

@Solype

@Solype Solype commented Nov 10, 2026

Copy link
Copy Markdown
Owner

An assignment is now written like a declaration: NAME은/는 VALUE이에요/예요 on a name already declared in the block or a block around it gives that variable a new value, of its type. There is still no shadowing.

개수는 0이에요.
개수는 (개수 + 1)이에요.               // 개수 = 개수 + 1
개수는 3과 4를 더해서 제곱한 값이에요.  // the result of a chain
  • The value of a declaration takes a whole chain, its last verb in the adnominal form before 값, latin verbs included (printf한 값), so every former 넣어요 chain has its form.
  • A wrong type ('개수' has the type 정수, not 소수) and a 고정된 variable are refused as before. A type (개수는 정수예요) or 고정된 on a declared name stays already declared.
  • 넣다 is no built-in verb any more: the Assign statement, put() and PutArguments are gone. The message on a lone = now points to 가는 1이에요.
  • Samples, specs, Proto.kr, the READMEs and docs/LANGUAGE_DESIGN.md are rewritten in the new form. sample/errors/assign_without_target.kr is deleted; already_declared, shadow_in_block and shadow_parameter now redeclare with a type, the only redeclaration still refused.

Breaking change: X에 V를 넣어요 no longer compiles, write X는 V예요.

Checked: cargo test (1386 passed), cargo clippy (no warning), scripts/run_samples.sh (61 passed). The migrated specs that still fail wait for their own issue (#2, #5, #6, #10, #20).

Makes #49 and #50 obsolete (closed).

`NAME은/는 VALUE이에요/예요` on a name already declared in the block or a
block around it now gives that variable a new value: the converter turns
the Init into an assignment, with the type and 고정된 checks of before.
A type (`가는 정수예요`) or 고정된 on a declared name stays an error.

The value of a declaration takes a whole chain, its last verb in the
adnominal form before 값 (`결과는 3과 4를 더해서 제곱한 값이에요`), latin
verbs included (`printf한 값`), so every 넣어요 chain has its form.

넣다 is no built-in verb any more: the Assign statement, put() and the
PutArguments error are gone. Samples, specs, READMEs and the design doc
are rewritten in the new form; the shadowing error samples now use a
type, the only redeclaration still refused.

BREAKING CHANGE: `X에 V를 넣어요` no longer compiles: write `X는 V예요`.
@Solype
Solype marked this pull request as ready for review November 10, 2026 14:59
@Solype
Solype merged commit 76b1116 into main Nov 10, 2026
1 check passed
@Solype
Solype deleted the feat/reassign-with-itis branch November 10, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant