Exemple #1
0
        public override InoTypeEnum Visit(ExprListAstNode node)
        {
            InoTypeEnum type;

            foreach (ASTNode child in node.Children)
            {
                type = Visit(child);
                if (type == InoTypeEnum.@float)
                {
                    return(type);
                }
                type = InoTypeEnum.undefined;
            }

            return(InoTypeEnum.@int);
        }
Exemple #2
0
        public override string Visit(ExprListAstNode node)
        {
            string exprListCode = "{ ";

            foreach (ASTNode child in node.Children)
            {
                if (child == node.Children[0])
                {
                    exprListCode += Visit(child);
                }
                else
                {
                    exprListCode += ", " + Visit(child);
                }
            }

            exprListCode += " }";

            return(exprListCode);
        }