erg/doc/JA/compiler/phases/04_name_resolve.md
2022-12-08 21:16:43 +09:00

10 lines
614 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Name resolving (名前解決)
Ergの名前解決フェーズは現在のところ型解析フェーズと一体化している。
これは良い設計であるとはいえず、将来的には分離される予定である。
名前解決フェーズで行われることは、以下の通りである。
* 変数名をスコープに対応付け、ユニークなIDを割り当て、必要ならば型変数を割り当てる
* 定数を依存関係に従って並び替える
* 定数式を評価し、可能ならば置換する(これは名前解決フェーズから分離される可能性がある)