【VSCode】作成 5【開発記】
今回の概略
include と名前の対応がおかしかったっぽい😑
確かに前回の見ると include のはアンダーなのに repository のとこはハイフンになってる🙄
【AiScript/原典】
aiscript/src/parser/
https://github.com/syuilo/aiscript/tree/master/src/parser
【VSCode/拡張/本家】
Your First Extension
https://code.visualstudio.com/api/get-started/your-first-extension
【TextMate/本家】
Language Grammars
https://macromates.com/manual/ja/language_grammars
【VSCode/拡張/正規表現での注意】
VSCodeのシンタックスハイライトの作り方
https://techblog.kayac.com/vscode-extension-syntax-highlight
【VSCode/拡張/txLaungage/name 付けるのに欲しい情報】
TextMate における文字色一覧
https://qiita.com/GET/items/a077f059da5e1a675107
----備忘録
スニペットの記号登録、エスケープで再び
前回の粗筋
コメントハイライトうまく動かない😞
TextMate
仕方ないので資料を読み込むぽ😞
ところどころ日本語なのが有り難いけれど訳が無いのもあるので google 翻訳に頑張ってもらうしかないお🙄
Language Grammars
https://macromates.com/manual/ja/language_grammars
目的のページは いきなり未翻訳😞
しかしまぁ Example は、前回まで調べて見てた tmLanguage.json の内容に比べるとだいぶ優しい🤤
captures, beginCaptures, endCaptures — these keys allow you to assign attributes to the captures of the match, begin, or end patterns. Using the captures key for a begin/end rule is short-hand for giving both beginCaptures and endCaptures with same values.
流し読みした感じだと capture は予想通り `()` の取得順に解決方法を提供可能にしている物っぽい🤔
前回 `[0]` を入れたけどこれは jsx の時の $& に相当するヤツだと思ってたんだけど…書いてない…?😞
jsx でも最初 $0 が match 全体だと勘違いしていたので鬼車なら $0 じゃないのかな…作法的に😑
状況からするとコメントドキュメントとかじゃないならブロックコメントで captures を使う必要は無い…かな🤔
![](https://assets.st-note.com/img/1684792325037-5LTFoskeLj.jpg)
![](https://assets.st-note.com/img/1684792325127-5U8dvFf1jc.jpg)
………😑
………
そういえばスニペットで出てきたからそのまま使ったけど名前が間違ってるんじゃない?と、唐突に思った🤔
TextMate における文字色一覧
https://qiita.com/GET/items/a077f059da5e1a675107
[
"normal",
"comment",
"comment.block",
"comment.block.documentation",
"comment.line",
_人人人人人人人人人_
> ピリオド区切り <
 ̄Y^Y^Y^Y^Y^Y^Y^ ̄
![](https://assets.st-note.com/img/1684792355526-hGtwIkWZa6.jpg)
![](https://assets.st-note.com/img/1684792355601-hZSnmndHTL.jpg)
😞😞😞
あーる氏のソース見て何か分からないかな…🤔
![](https://assets.st-note.com/img/1684792377165-j0j2Oz3xrf.jpg)
![](https://assets.st-note.com/img/1684792377259-F1pshXwseF.jpg)
………🤔
名前の付け方が…おかしい…?🙄
![](https://assets.st-note.com/img/1684792392100-33QzGs6IAc.jpg)
![](https://assets.st-note.com/img/1684792392140-j38SPlr98E.jpg)
キタ━━━━(゚∀゚)━━━━!!
include のとこに書いた名前の対応が正しくなかっただけなのかな…😑
これ、公式の TypeScript とか見ても複雑過ぎて参考にならないでしょ😞
しかも VSCode のスニペットがハイフンで勧めてくるという罠🙄
またしても あーる氏に救われた…😭
次回は
文字列かな🤤
これの対応はかなり難しいけどまずは単純な対応からするぽ🤔
この記事が気に入ったらサポートをしてみませんか?