orbit-lang/Bootstrap

TypeChecker - Propagate SourcePosition

オープン

#4 opened on 2021/05/16

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Kotlin (0 件のフォーク)auto 404
TypeCheckergood first issue

Repository metrics

Stars
 (0 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Currently, information about source positions & tokens is effectively thrown away after the frontend phase is complete, because Types do not currently capture source positions from their source nodes. It should be fairly simple to extend the TypeProtocol interface to capture a meaningful SourcePosition in most cases.

This metadata is useful for propagating good error messages. Currently, errors & warnings from the TypeChecker phase are reported as occurring at SourcePosition (line: 0, offset: 0), which is obviously bad.

コントリビューターガイド