While.Parsing.Parser.Args C# (CSharp) Метод

Args() публичный Метод

public Args ( VariableSequence valArgs, Variable &resultArg ) : void
valArgs While.AST.Sequences.VariableSequence
resultArg Variable
Результат void
        void Args(VariableSequence valArgs, out Variable resultArg)
        {
            resultArg = null;
            if (IsStartOfResultArg()) {
            Expect(12);
            Expect(8);
            Expect(1);
            resultArg = new Variable(t.val);
            resultArg.IsResultArg = true;
            if (SymbolTable.IsDeclaredInCurrentScope(t.val)) {
                errors.SemErr(t.line, t.col, string.Format("Argument '{0}' is already declared in this scope",t.val));
            } else {
                SymbolTable.DefineResultArgument(t.val);
            }

            } else if (la.kind == 12) {
            Get();
            Expect(1);
            Variable v = new Variable(t.val);
            v.IsValueArg = true;
            valArgs.AddVariable(v);
            if (SymbolTable.IsDeclaredInCurrentScope(t.val)) {
                errors.SemErr(t.line, t.col, string.Format("Argument '{0}' is already declared in this scope",t.val));
            } else {
                SymbolTable.DefineArgument(t.val);
            }

            if (la.kind == 12) {
                Args(valArgs, out resultArg);
            }
            } else SynErr(51);
        }