본문으로 건너뛰기
토파즈6.0 · 출시 전
다운로드 →

문서 검색

명세 6.0

방향키로 결과를 고르고 Enter를 눌러 여세요.

API 이름, 진단 번호, 규칙 또는 프로젝트 주제를 입력하세요.

    진단 TPZ0007

    A source name outside Unicode 16.0.0 NFC produces TPZ0007 during lexing.

    Diagnostic and cause

    링크

    Source name is not NFC

    계열
    topaz
    단계
    lex
    코드
    TPZ0007

    원인과 조건

    The complete name must already be in Unicode 16.0.0 NFC form in the source. This applies to declarations, references, members, fields, label bodies, and template tag names. Check the whole sequence before keyword or tag classification.

    Bindings and lookup compare the admitted scalar sequence exactly. They do not normalize a spelling silently or create a second alias. NFC uses canonical equivalence. It does not apply compatibility normalization or case folding.

    A non-NFC name produces TPZ0007 during lex. Mark the complete name span, excluding a label's apostrophe and a tag's string delimiter, and suggest its NFC spelling. Review the replacement for collisions before changing the source.

    대응

    Replace the complete name with its Unicode 16.0.0 NFC spelling. Apply the reviewed spelling consistently to its declaration and references. Report the original name span and suggest the NFC replacement. Do not silently add a lookup alias.

    Topaz 6.0.0 specifies this diagnostic during lex.

    The target message is source name café is not NFC.

    The pinned SELF source does not emit this diagnostic.

    Source names must already use Unicode 16.0.0 NFC spelling. Reject a non-NFC name during lexing before keyword and tag classification. Report the complete original name span. Exclude a label prefix or string delimiter from that span. Suggest the NFC spelling without adding a lookup alias. Strings retain their exact scalars. The name rule defines accepted source spelling.

    규칙diagnostics.tpz0007.p5.rule

    Source name is not NFC

    Source names must already use Unicode 16.0.0 NFC spelling. Reject a non-NFC name during lexing before keyword and tag classification. Report the complete original name span. Exclude a label prefix or string delimiter from that span. Suggest the NFC spelling without adding a lookup alias. Strings retain their exact scalars. The name rule defines accepted source spelling.

    이유

    This applies the adopted identifier-normalization.1 decision. The language chapter owns the rejection condition and source span.

    Response

    링크

    Replace the complete name with its Unicode 16.0.0 NFC spelling. Apply the reviewed spelling consistently to its declaration and references. Report the original name span and suggest the NFC replacement. Do not silently add a lookup alias.

    Reproduction and verification

    링크

    Rejected program

    링크
    example.tpzRejected program플레이그라운드 열기 →
    1. let café = 1
    기대 출력0이 아닌 종료 코드
    표준 출력 없음.
    $ topaz check example.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    거절 단계 lex. 종료 코드가 0이 아닙니다.

    The matcher describes a Topaz 6.0 target message. Public Topaz 5.21.3 does not implement this diagnostic producer.

    Repaired program

    링크
    example.tpzRepaired program
    1. let café: int = 1
    2. let 가: int = 2
    3. let K: int = 3
    4. let value: int = café + 가 + K
    기대 출력종료 코드 0
    $ topaz check example.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    검사가 프로그램을 받아들입니다. 종료 코드 0.

    The matcher describes a Topaz 6.0 target message. Public Topaz 5.21.3 does not implement this diagnostic producer.

    메뉴

    다운로드 →