Пример #1
0
        /// toplevelexpr ::= expression
        public FunctionAST ParseTopLevelExpr()
        {
            ExprAST e = ParseExpression();
            if(e != null)
            {
                PrototypeAST proto = new PrototypeAST("", new string[0], false, 0);
                return new FunctionAST(proto, e);
            }

            return null;
        }
Пример #2
0
 public FunctionAST(PrototypeAST proto, ExprAST body)
 {
     this.Proto = proto;
     this.Body = body;
 }