AjTalk.Compilers.Vm.BytecodeCompiler.Visit C# (CSharp) Метод

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

public Visit ( ArrayExpression expression ) : void
expression AjTalk.Model.ArrayExpression
Результат void
        public override void Visit(ArrayExpression expression)
        {
            this.block.CompileGetConstant(expression.AsObjectArray());
        }

Same methods

BytecodeCompiler::Visit ( BlockExpression expression ) : void
BytecodeCompiler::Visit ( ClassModel @class ) : void
BytecodeCompiler::Visit ( ClassVariableExpression expression ) : void
BytecodeCompiler::Visit ( CodeModel model ) : void
BytecodeCompiler::Visit ( ConstantExpression expression ) : void
BytecodeCompiler::Visit ( DynamicArrayExpression expression ) : void
BytecodeCompiler::Visit ( FluentMessageExpression expression ) : void
BytecodeCompiler::Visit ( FreeBlockExpression block ) : void
BytecodeCompiler::Visit ( IEnumerable expressions ) : void
BytecodeCompiler::Visit ( InstanceVariableExpression expression ) : void
BytecodeCompiler::Visit ( MessageExpression expression ) : void
BytecodeCompiler::Visit ( MethodModel method ) : void
BytecodeCompiler::Visit ( PrimitiveExpression expression ) : void
BytecodeCompiler::Visit ( ReturnExpression expression ) : void
BytecodeCompiler::Visit ( SelfExpression expression ) : void
BytecodeCompiler::Visit ( SetExpression expression ) : void
BytecodeCompiler::Visit ( SymbolExpression expression ) : void
BytecodeCompiler::Visit ( VariableExpression expression ) : void

Usage Example

Пример #1
0
        public override void Visit(BlockExpression expression)
        {
            Block newblock = new Block(null, this.block);

            // TODO Review is the copy of argument and local names is needed
            foreach (var parname in this.block.ParameterNames)
                newblock.CompileArgument(parname);

            foreach (var locname in this.block.LocalNames)
                newblock.CompileLocal(locname);

            if (expression.ParameterNames != null)
                foreach (var parname in expression.ParameterNames)
                    newblock.CompileArgument(parname);

            if (expression.LocalVariables != null)
                foreach (var locname in expression.LocalVariables)
                    newblock.CompileLocal(locname);

            var compiler = new BytecodeCompiler(newblock);
            compiler.Visit(expression.Body);
            this.block.CompileGetBlock(newblock);
        }