コード例 #1
0
        public LocalVariableDeclarationCompiler(ILocalVariableDeclaration localVariableDeclaration,
                                                AbstractILCompilerParams @params) : base(@params)
        {
            myLocalVariableDeclaration = localVariableDeclaration;
            var variableName = myLocalVariableDeclaration.DeclaredName;

            myLocalVariableReference = MyParams.LocalVariableIndexer.GetNextVariable(variableName);
        }
コード例 #2
0
        public VariableDeclarationCompiler(IVariableDeclaration variableDeclaration,
                                           AbstractILCompilerParams @params) : base(@params)
        {
            myVariableDeclaration = variableDeclaration;
            var variableName = myVariableDeclaration.DeclaredName;

            try
            {
                MyParams.LocalVariableIndexer.GetNextVariable(variableName);
            }
            catch (Exception e)
            {
                throw MyParams.CreateException($"var stacks exception");
            }
        }
コード例 #3
0
 public BaseExpressionCompiler(IBaseExpression baseExpression, AbstractILCompilerParams @params) : base(@params)
 {
     myBaseExpression = baseExpression;
 }
コード例 #4
0
 public ThisExpressionCompiler(IThisExpression thisExpression, AbstractILCompilerParams @params) : base(@params)
 {
     myThisExpression = thisExpression;
 }
コード例 #5
0
 public AccessorDeclarationCompiler(IAccessorDeclaration accessor, AbstractILCompilerParams myParams) : base(myParams)
 {
     myAccessor = accessor;
     MyParams.CreateMethod(accessor.DeclaredElement);
 }
コード例 #6
0
 public ObjectCreationExpressionCompiler(IObjectCreationExpression objectCreationExpression, AbstractILCompilerParams @params) : base(@params)
 {
     myObjectCreationExpression = objectCreationExpression;
 }
コード例 #7
0
 public EnumDeclarationCompiler(IEnumDeclaration enumDeclaration, AbstractILCompilerParams myParams) : base(myParams)
 {
     myEnumDeclaration = enumDeclaration;
     myParams.CreateClass(myEnumDeclaration.DeclaredElement.GetClrName().FullName);
 }
コード例 #8
0
 public ConstantDeclarationCompiler(IConstantDeclaration constantDeclaration,
                                    AbstractILCompilerParams @params) : base(@params)
 {
     myConstantDeclaration = constantDeclaration;
 }
コード例 #9
0
        public ClassLikeDeclarationCompiler(IClassLikeDeclaration classLikeDeclaration, AbstractILCompilerParams myParams) : base(myParams)
        {
            myClassLikeDeclaration = classLikeDeclaration;

            var newClass = myParams.CreateClass(myClassLikeDeclaration.DeclaredElement.GetClrName().FullName);

            if (myClassLikeDeclaration is IClassDeclaration classDeclaration)
            {
                var baseClass = new ClassId(classDeclaration.DeclaredElement.GetBaseClassType().GetClrName().FullName);
                newClass.BaseClass = baseClass;
            }
        }