orbit-lang/Bootstrap

Investigation - Lexer - Support Unicode Identifiers

开放

#8 创建于 2021年8月22日

 (0 条评论) (0 个反应) (0 位负责人)Kotlin (0 个派生)auto 404
Lexerenhancementgood first issuequestion

仓库指标

星标
 (0 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Currently, the lexer only matches [a-z_]+[a-zA-Z0-9_]* for identifiers (terms). However, most modern languages support the full set of Unicode word characters.

It its important to remember that Orbit is opinionated about identifiers, requiring them to begin with 1 or more lowercase letters, to distinguish them from type identifiers, which are always capitalised.

Before we can support Unicode identifiers, we need to determine what we consider a lowercase character. Do we say any character outside of ASCII a-z can be used in place of a lowercase? Or, do we define a strict subset of Unicode characters that may be used as lowercase?

贡献者指南