无标题无名氏No.66483338 返回主串
2025-07-03(四)18:22:00 ID:qx5Q9yb 回应
整一门基于yaml写法的语言,用于表达程序逻辑,翻译到其他计算机语言再运行,有没有市场呢( '_ゝ')旦
无标题无名氏No.66490589
2025-07-04(五)20:06:00 ID: qx5Q9yb (PO主)
>>No.66490315
去看了一下
woc,.net
不过没关系,c#太重,就做个轻量版的好啦(`ᝫ´ )
无标题无名氏No.66491462
2025-07-04(五)21:56:29 ID: qx5Q9yb (PO主)
例子:
---class *pub User extends BaseUser with ClassInterface,elseclass():
User (name):
- this.name: name
- this.age: age
- this.id: $generateId()
~User(dropprop1,dropprop2):
ui: "unimplemented"
_ *priv prop2: int=23
prop3: 34
def *priv getName():
- return: this.name
def setAge(newAge):
- if: newAge > 0
then: this.age = newAge
else: throw "Invalid age"
...
---
def *pub *someotherstuff *bur fun(gemen)-> nihao:
- bur
- console.log("bushi,"+gemen)
- return: "nihao"
...
无标题无名氏No.66491858
2025-07-04(五)22:32:02 ID: qx5Q9yb (PO主)
>>No.66491550
因为yaml有现成的解析器,拿解析回来的js object改改就能成抽象语法树
然后就方便转译
写新语言的话又很明显累赘