orbit-lang/Bootstrap

TypeChecker - Propagate SourcePosition

Aberta

#4 aberto em 16 de mai. de 2021

 (0 comentário) (0 reação) (0 responsável)Kotlin (0 fork)auto 404
TypeCheckergood first issue

Métricas do repositório

Stars
 (0 estrela)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador