Exemple #1
0
 internal xastlist(ASTList al)
 {
     foreach (AST item in al.list)
     {
         list.Add(parser(item));
     }
 }
Exemple #2
0
            public FunctionCall(Token token, AST func, ASTList args) : base(token)
            {
                Func = func;
                Args = args;

                Func.Parent = this;
                Args.Parent = this;
            }
Exemple #3
0
 public void Visit(ASTList t, IEnvironment env)
 {
     if (debug)
     {
         System.Console.WriteLine("ASTList: " + t.GetType().ToString());
     }
     result = new ErrorValue("cannot eval: " + t.ToString());
     return;
 }
Exemple #4
0
    public static AST leastCommonAncestor(AST u, AST v)
    {
        ASTList nodes = new ASTList();

        for ( ; u != null; u = u.parent)
        {
            nodes.Add(u);
        }
        for ( ; v != null; v = v.parent)
        {
            if (nodes.Contains(v))
            {
                return(v);
            }
        }
        return(null);
    }
Exemple #5
0
            public InitArray(Token token, ASTList items) : base(token)
            {
                Items = items;

                Items.Parent = this;
            }
 // Constructors
 public ArrayLiteral(Context context, ASTList elements)
 {
 }