ipulang
- 20211226_toy_llvm_compiler にまとめました.
-
chumskyで parser 書き直したい. -
Rewriting the parser with using
chumskycrate
Overview
Currently, ipulang program directly parses to AST by using the parser combinator, nom crate. it is not suitable for supporting comment statements and getting token location for supporting syntax highting in its LSP. Therefore, want to rewrite the parser to support token location acquisition.
Specifically, we use zesterer/chumsky crate.
I thought about parsing custom input sequences by nom. but I decided not to use . I’m going to chose chumsky because it can output rich error reports with ease by using zesterer/ariadne crate.
- インタプリタ, LSP Semantic Tokens はあらかた出来た
- rust-analyzer/rowan
- rust-analyther が使っているAST parser
- Language Server Protocol: semanticTokens の capability設定しているのに呼ばれない
- VSCodeの設定: Semantic Highlighting: Enabled が configured by file になっていてtrueにしたら動いた
- dataで返しているのに色がつかない
- Semantic Highlight Guide | Visual Studio Code Extension API
- 差分の計算

🎉🎉🎉
- コメントフィルターしてdone
- diagnostics
Semantic Tokens完全に理解した
2022-05-14
作って学ぶコンピュータアーキテクチャ —— LLVMとRISC-Vによる低レイヤプログラミングの基礎 | 木村 優之 |本 | 通販 | Amazon が発売されたら RISC-V targetを作って, LLVM Backend入門やるかも.
Record型とSubtyping, Structural Subtyping を導入するべく, 型システムの実装をしている.
-
rust Rust RefCell やっと使い所がわかったと思ったが結局ランタイムでpanicするので下位互換
-
- LLVM IRの構造体実装方法
repo
- GitHub - i-pu/ipulang: コンパイラ作りたいみたいな
- [GitHub - wakame-tech/ipulang-contrib: ipulang でLSPをサポートするための調査repo](https://github.com/wakame-tech/ipulang-contrib)
- LSP調査用repo
