Exemple #1
0
 public FieldSymbolScript(string name, TypeProxy type)
     : base(name, type, null, null, null)
 {
     this.getter = Getter;
     this.setter = Setter;
     this.getref = Getref;
 }
Exemple #2
0
 public FieldSymbol(string name, TypeProxy type, FieldGetter getter = null, FieldSetter setter = null, FieldRef getref = null)
     : base(name, type)
 {
     this.getter = getter;
     this.setter = setter;
     this.getref = getref;
 }
Exemple #3
0
 public FuncSignature(TypeProxy ret_type, params TypeProxy[] arg_types)
 {
     this.ret_type = ret_type;
     foreach (var arg_type in arg_types)
     {
         this.arg_types.Add(arg_type);
     }
     Update();
 }
Exemple #4
0
        public ArrayTypeSymbol(Types ts, string name, TypeProxy item_type)
            : base(name, super_class: null)
        {
            this.item_type = item_type;

            this.creator = CreateArr;

            {
                var fn = new FuncSymbolNative("Add", ts.Type("void"), Add,
                                              new FuncArgSymbol("o", item_type)
                                              );
                this.Define(fn);
            }

            {
                var fn = new FuncSymbolNative("RemoveAt", ts.Type("void"), RemoveAt,
                                              new FuncArgSymbol("idx", ts.Type("int"))
                                              );
                this.Define(fn);
            }

            {
                var fn = new FuncSymbolNative("Clear", ts.Type("void"), Clear);
                this.Define(fn);
            }

            {
                var vs = new FieldSymbol("Count", ts.Type("int"), GetCount, null);
                this.Define(vs);
            }

            {
                //hidden system method not available directly
                FuncArrIdx = new FuncSymbolNative("$ArrIdx", item_type, ArrIdx);
            }

            {
                //hidden system method not available directly
                FuncArrIdxW = new FuncSymbolNative("$ArrIdxW", ts.Type("void"), ArrIdxW);
            }
        }
Exemple #5
0
 public FuncSignature(TypeProxy ret_type, List <TypeProxy> arg_types)
 {
     this.ret_type  = ret_type;
     this.arg_types = arg_types;
     Update();
 }
Exemple #6
0
 public void Add(TypeProxy item)
 {
     items.Add(item);
     Update();
 }
Exemple #7
0
 public RefType(TypeProxy subj)
 {
     this.subj = subj;
 }
Exemple #8
0
 public TypeArg(string name)
 {
     this.name = name;
     this.tp   = default(TypeProxy);
 }
Exemple #9
0
 public FuncArgSymbol(WrappedParseTree parsed, string name, TypeProxy type, bool is_ref = false)
     : this(name, type, is_ref)
 {
     this.parsed = parsed;
 }
Exemple #10
0
 public VariableSymbol(string name, TypeProxy type)
     : base(name, type)
 {
 }
Exemple #11
0
 public VariableSymbol(WrappedParseTree parsed, string name, TypeProxy type)
     : this(name, type)
 {
     this.parsed = parsed;
 }
Exemple #12
0
 public ArrayTypeSymbolT(Types ts, TypeProxy item_type, CreatorCb creator)
     : base(ts, item_type.name + "[]", item_type)
 {
 }
Exemple #13
0
 public ArrayTypeSymbolT(Types ts, string name, TypeProxy item_type, CreatorCb creator)
     : base(ts, name, item_type)
 {
     Creator = creator;
 }
Exemple #14
0
 public GenericArrayTypeSymbol(Types types, TypeProxy item_type)
     : base(types, item_type)
 {
     name = "[]" + item_type.name;
 }
Exemple #15
0
 public ArrayTypeSymbol(Types ts, TypeProxy item_type)
     : this(ts, item_type.name + "[]", item_type)
 {
 }
Exemple #16
0
 public FuncSignature(TypeProxy ret_type)
 {
     this.ret_type = ret_type;
     Update();
 }
Exemple #17
0
 public void AddArg(TypeProxy arg_type)
 {
     arg_types.Add(arg_type);
     Update();
 }
Exemple #18
0
 public FuncArgSymbol(string name, TypeProxy type, bool is_ref = false)
     : base(name, type)
 {
     this.is_ref = is_ref;
 }
Exemple #19
0
 public TypeArg(TypeProxy tp)
 {
     this.name = null;
     this.tp   = tp;
 }
Exemple #20
0
 public Symbol(string name, TypeProxy type)
 {
     this.name = name;
     this.type = type;
 }