Exemplo n.º 1
0
        public override void Resolve(Session session, RangeVariable[] rangeVars)
        {
            bool flag = false;
            int  type = base.type;

            if (type <= 0x35)
            {
                if ((type != 9) && (type != 0x35))
                {
                    goto Label_01D3;
                }
                OrderedHashSet <string> colNames = new OrderedHashSet <string>();
                colNames.Add(this.cursorVariableName);
                int[]          indexes   = new int[colNames.Size()];
                ColumnSchema[] variables = new ColumnSchema[colNames.Size()];
                StatementSet.SetVariables(rangeVars, colNames, indexes, variables);
                this.cursorVariableNameIndex = indexes[0];
                this.variable = variables[0];
                if (this.cursorVariableNameIndex < 0)
                {
                    throw Error.GetError(0xe10);
                }
                if (this.variable == null)
                {
                    throw Error.GetError(0xe10);
                }
                flag = true;
                goto Label_01E3;
            }
            switch (type)
            {
            case 0x59:
                flag = true;
                goto Label_01E3;

            case 90:
                break;

            case 0x5b:
            case 0x5c:
                if (this._conditionName != null)
                {
                    OrderedHashSet <string> colNames = new OrderedHashSet <string>();
                    colNames.Add(this._conditionName.Name);
                    int[]          indexes   = new int[colNames.Size()];
                    ColumnSchema[] variables = new ColumnSchema[colNames.Size()];
                    StatementSet.SetVariables(rangeVars, colNames, indexes, variables);
                    this._conditionIndex = indexes[0];
                    if (this._conditionIndex == -1)
                    {
                        throw Error.GetError(0x19e0, this._conditionName.Name);
                    }
                }
                if (this._conditionInformationItems != null)
                {
                    foreach (Expression local1 in this._conditionInformationItems.Values)
                    {
                        ExpressionColumn.CheckColumnsResolved(local1.ResolveColumnReferences(rangeVars, null));
                        local1.ResolveTypes(session, null);
                    }
                }
                flag = true;
                goto Label_01E3;

            default:
                if (type == 0x66)
                {
                    for (StatementCompound compound = base.Parent; compound != null; compound = compound.Parent)
                    {
                        if ((compound.IsLoop && (compound.label != null)) && this.label.Name.Equals(compound.label.Name))
                        {
                            flag = true;
                            break;
                        }
                    }
                    goto Label_01E3;
                }
                break;
            }
Label_01D3:
            throw Error.RuntimeError(0xc9, "");
Label_01E3:
            if (!flag)
            {
                throw Error.GetError(0x15e2);
            }
        }
Exemplo n.º 2
0
 public void SetParent(StatementCompound statement)
 {
     this.Parent = statement;
 }