public void Run(ICompilerContext context)
 {
     context.Attributes.Type <object>()
     .Add(new RedirectMethodsToAttribute("system.ObjectExtensions"));
     context.Attributes.Type <Type>()
     .Add(new NameAttribute("system.CsType"));
     context.Attributes.Type <string>()
     .Add(new NameAttribute("system.CsString"));
     context.Attributes.Type <bool>()
     .Add(new NameAttribute("system.Boolean"));
     context.Attributes.Type <byte>()
     .Add(new NameAttribute("system.Byte"));
     context.Attributes.Type <char>()
     .Add(new NameAttribute("system.Char"));
     context.Attributes.Type <short>()
     .Add(new NameAttribute("system.Int16"));
     context.Attributes.Type <int>()
     .Add(new NameAttribute("system.Int32"));
     context.Attributes.Type <long>()
     .Add(new NameAttribute("system.Int64"));
     context.Attributes.Type <sbyte>()
     .Add(new NameAttribute("system.SByte"));
     context.Attributes.Type <ushort>()
     .Add(new NameAttribute("system.UInt16"));
     context.Attributes.Type <uint>()
     .Add(new NameAttribute("system.UInt32"));
     context.Attributes.Type <ulong>()
     .Add(new NameAttribute("system.UInt64"));
     context.Attributes.Type(typeof(Math))
     .Add(new NameAttribute("system.CsMath"));
     context.Attributes.Type <float>()
     .Add(new NameAttribute("system.Single"));
     context.Attributes.Type <double>()
     .Add(new NameAttribute("system.Double"));
 }
Example #2
0
        public ModuleImage Compile(Parser parser, ICompilerContext context)
        {
            _module = new ModuleImage();
            _ctx = context;
            _parser = parser;
            _parser.Start();

            BuildModule();
            CheckForwardedDeclarations();

            return _module;
        }
Example #3
0
 public MemberContext(ICompilerContext context)
 {
     this.Context = context;
 }
Example #4
0
 public virtual void compile(ICompilerContext context, int insn)
 {
     flags |= FLAG_INTERPRETED;
     context.compileInterpreterInstruction();
 }
Example #5
0
 public override void compile(ICompilerContext context, int insn)
 {
     base.compile(context, insn);
 }
Example #6
0
 public override void compile(ICompilerContext context, int insn)
 {
     instance(insn).compile(context, insn);
 }
Example #7
0
 public CompilerLocalVarParameterReader(ICompilerContext compilerContext, int localVarIndex) : base(compilerContext)
 {
     this.localVarIndex = localVarIndex;
 }
Example #8
0
 public CompilerParameterReader(ICompilerContext compilerContext) : base(null, null)
 {
     this.compilerContext = compilerContext;
 }