Skip to content

ノードの終了位置の追加 #722

@uzmoi

Description

@uzmoi

nextのパーサーだとlocに入るのがノードの開始位置のみになっていますが、これを以前のパーサーと同じ情報が取れるようにしたい。
言語処理系を作っていると欲しくなります。

CharStreamgetPosメソッドがあり、これが返す型が{ line: number, column: number }です。
なので、これをPositionとして、{ start: Position, end: Position }Locとしたい。

public getPos(): { line: number, column: number } {

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions