---
title: "규칙 3.7: 텍스트 구조와 이름, TypeShade 셰이더 언어 설계 규칙과 그 근거, 출처, 검증 방식"
description: "TypeShade 언어 설계 규칙 3.7(텍스트 구조와 이름)입니다. A new surface section must take the next free § number in docs/use-typeshade-surface.md as the current tree makes it…"
url: https://typeshade.dev/ko/reference/rules/3-7/
language: ko
---

# 규칙 3.7

3장, 텍스트 구조와 이름 리뷰

A new surface section must take the next free `§` number in `docs/use-typeshade-surface.md` as the current tree makes it, and a new diagnostic must take the next free `TS80xx` code in `src/compiler/ts/codes.ts`. A branch working in parallel may instead be handed a block of numbers and take the number from the block. A number must not be renumbered, a retired number must not be reused, and the unused numbers of a block must stay a gap.

규칙 본문과 그 아래 항목은 설계 문서에 적힌 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.

## 근거

a section number and a code are cited from issues, tests, and CHANGELOG entries that do not move when the document does.

## 출처

[#162](https://github.com/typeshade/typeshade/issues/162) (“claim before you write”); PR [#165](https://github.com/typeshade/typeshade/issues/165)’s body, which took its numbers from a block; the numbering comment at the head of `codes.ts` (8011 is retired and stays a gap; [`TS8099`](https://typeshade.dev/ko/reference/errors/ts8099/) is the parked catch-all; after [`TS8038`](https://typeshade.dev/ko/reference/errors/ts8038/), a block handed to a parallel branch leaves a gap that is never reused).

## 검증 방식

리뷰로 지킵니다. 확인하는 파일은 없고, 규칙 스스로 리뷰가 지킨다고 적어 두었습니다.

컴파일러가 이 규칙을 적용하는 곳을 규칙이 직접 적은 내용입니다.

review; `src/compiler/ts/codes.ts` is a hot-spot file ([Rule 13.5](https://typeshade.dev/ko/reference/rules/13-5/)).

커밋 af54ddad5에서 이 규칙을 확인하는 파일입니다. 파일마다 규칙을 처음 가리키는 줄로 연결했습니다.

- [`src/compiler/ts/codes.ts:1`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/codes.ts#L1)

## 함께 보기

- [규칙 3.6](https://typeshade.dev/ko/reference/rules/3-6/) 테스트
- [규칙 3.8](https://typeshade.dev/ko/reference/rules/3-8/) 테스트
- [규칙 13.5](https://typeshade.dev/ko/reference/rules/13-5/)
- [설계 규칙](https://typeshade.dev/ko/reference/rules/)
- [오류 코드](https://typeshade.dev/ko/reference/errors/)

## 소스

커밋 af54ddad5의 규칙 원문:

- [`docs/language-design.md:309`](https://github.com/typeshade/typeshade/blob/af54ddad5/docs/language-design.md#L309) (설계 문서)
- [`reqs/rules/RULE-0307.md`](https://github.com/typeshade/typeshade/blob/af54ddad5/reqs/rules/RULE-0307.md) (추적 항목)
