예제 #1
0
        public SymbolTable(CodeGenerationTarget target)
        {
            this.target = target;

            AddType(new SimpleSymbol("IntPtr.Zero", "void", "void", "V"));
            AddType(new SimpleSymbol("false", "boolean", "bool", "Z"));
            AddType(new SimpleSymbol("0", "byte", "sbyte", "B"));
            AddType(new SimpleSymbol("(char)0", "char", "char", "C"));
            AddType(new SimpleSymbol("0.0", "double", "double", "D"));
            AddType(new SimpleSymbol("0.0F", "float", "float", "F"));
            AddType(new SimpleSymbol("0", "int", "int", "I"));
            AddType(new SimpleSymbol("0L", "long", "long", "J"));
            AddType(new SimpleSymbol("0", "short", "short", "S"));
            AddType(new SimpleSymbol("0", "uint", "uint", "I", returnCast: "(uint)"));
            AddType(new SimpleSymbol("0", "ushort", "ushort", "S", returnCast: "(ushort)"));
            AddType(new SimpleSymbol("0", "ulong", "ulong", "J", returnCast: "(ulong)"));
            AddType(new SimpleSymbol("0", "ubyte", "byte", "B", returnCast: "(byte)"));
            char_seq   = new CharSequenceSymbol();
            string_sym = new StringSymbol();
            if (target == CodeGenerationTarget.JavaInterop1)
            {
                return;
            }
            AddType("Android.Graphics.Color", new ColorSymbol());
            instream_sym          = new StreamSymbol("InputStream");
            outstream_sym         = new StreamSymbol("OutputStream");
            fileinstream_sym      = new StreamSymbol("FileInputStream", "InputStream");
            fileoutstream_sym     = new StreamSymbol("FileOutputStream", "OutputStream");
            xmlpullparser_sym     = new XmlPullParserSymbol();
            xmlresourceparser_sym = new XmlResourceParserSymbol();
        }
예제 #2
0
 public ArraySymbol(ISymbol sym, CodeGenerationTarget target)
 {
     this.target = target;
     if (sym.FullName == "sbyte")
     {
         this.sym = byte_sym;
     }
     else
     {
         this.sym = sym;
     }
 }