Пример #1
0
        public VariableList FunctionParam()
        {
            var list  = new VariableList();
            var type  = this.BaseType();
            var token = this.lexer.ConsumeIdentifier();

            type     = this.TypeSuffix(type);
            list.Var = this.ParameterDeclaration(token.StrValue, type);

            return(list);
        }
Пример #2
0
        public LocalVariable ParameterDeclaration(string name, Type type)
        {
            var val  = new LocalVariable(name, 0);
            var list = new VariableList();

            val.Type  = type;
            list.Var  = val;
            list.Next = this.Locals;

            this.Locals = list;

            return(val);
        }