〇 - 文法作成 ![]()
|
〇 - パーサのテスト [実施中]
|
〇 - IR系の作成
|
〇 - その他…
文法をテストしたらエラー出たのでAIに渡したらよくわかんない文法になったうえに治ってません
AST治ったー
import (a, b, c) from "test-lib";
import (open, OpenType) from "filesystem";
<const>content = open("./mytext.txt", OpenType.ReadOnly) => (f) {
<const>content = f.read();
return (content);
}
class MyClass {
header {
special [ContextManagement.Enter]: function, // functionは関数の型。function(args=(型1, 型2 ...), return=型)のように記述もできる
special [ContextManagement.Exit]: function
}
special fn [ContextManagement.Enter]() {
* omitted
}
special fn [ContextManagement.Exit]() {
* omitted
}
}
さあさあ!再開発しようか!
我々にはAIがある!
enum object (superpos)Types { // superpos属性が指定されてると複数の状態を結合できる
Great = "Hello!";
See = "See You!";
}
<const>great = Types.great;
<const>see = Types.See;
great == Types.great // true
<const>greatSee = great | see;
greatSee contains see // true
エラーが出たことしかわからねえ
import (with_open, OpenType) from “filesystem”;
content = open(“./mytext.txt”, OpenType.ReadOnly) => (f) {
content = f.read();
return (content);
}
mytext.txtの内容を返すんですね
「いいね!」 1
もしやこのエラーはtl3から出ているということ!?
その通り!!
ちなみにVSCode拡張も作ります!!
というか作ってる!
うい
import (with_open, OpenType) from "filesystem";
<const>content = with_open("./mytext.txt", OpenType.ReadOnly) => (f) {
<const>content = f.read();
return (content);
}
println(content); // Hello, World!
すげえ動いてる!
import (with_open, OpenType) from "filesystem";
<const>content = with_open("./mytext.txt", OpenType.ReadOnly) => (f) {
<const>content = f.read();
return (content);
}
for i: int << (r'1~10) {
println(i);
}
println("これより下はmytext.txtの内容です。");
println(content);
うい
青の波線は?




