Is there a better way to do C style error handling?

前端 未结 10 1839
时光说笑
时光说笑 2021-02-20 06:43

I\'m trying to learn C by writing a simple parser / compiler. So far its been a very enlightening experience, however coming from a strong background in C# I\'m having some pro

10条回答
  •  失恋的感觉
    2021-02-20 07:19

    What about this?

    int NS_Expression(void)
    {
        int ok = 1;
        ok = ok && NS_Term();
        ok = ok && Emit("MOVE D0, D1\n");
        ok = ok && NS_AddSub();
        return ok
    }
    

提交回复
热议问题