StepfenShawn / Cantonese

粤语編程語言.The Cantonese programming language.
https://cantonese-community.github.io/
MIT License
1.15k stars 46 forks source link

大佬啊 分下文件啦 一个文件1000+行太可怕了 #25

Open wztscau opened 3 years ago

ghost commented 3 years ago

分不分无所谓的啦😂个人感觉没这个必要吧

StepfenShawn commented 3 years ago

我觉得宜家代码仲唔算多,所以用一个文件方便啲,因为只要复制一个文件就可以运行了,不过到时代码真係太多嘅话,会考虑分下

nobodxbodon commented 3 years ago

读代码的确会吃力些,个人建议尽早拆分为好。 木兰的结构供参考:https://gitee.com/MulanRevive/mulan-rework/tree/master/%E6%9C%A8%E5%85%B0 大概看了一下最大区别也许是木兰是直接生成 python 语法树,没有定义自己的语法树模型。 如果按照如下拆分的话,也许新人看起来会更方便?

词法分析、语法分析、语法树模型、主程序和内置函数、辅助功能