wgtcc
wgtcc copied to clipboard
无法同时处理多个文件
for example:
wgtcc -S 1.c 2.c
yes, it is. Once upon a time, it supported multiple files. I disabled it(the code is simplified also) for convenience of debugging, i will reenable it later.
(ps: we better in English because i occasionally found that there are some foreigners looking at this repo :)
There is another friend that is working on an interesting compiler project https://github.com/thinkermao/LL-Script, a small interpreted language.
wgtcc是单进程程序吧?而且遇到错误就退出了,因此是如何支持处理多个文件的呢?第一个文件语法错误导致进程退出,这样第二个文件不就没被处理了么?
A single source file is a translation unit.Which means we could fork(),so every child process handle a source file :)
这样不好迁移到windows了,因为windows创建子进程要用文件,如果用一个函数的话,只能通过windows的POSIX子系统,然而这个子系统已经不维护了 :) 最开始我为了简单起见,也是单个二进制+fork,迁移到windows发现不大好了
We'd better talk in QQ. Can you send your QQ to my email? Thx.
Yeah, my pleasure~~
But, where do i get your email? :)
I've updated my github profile :->