Exemplo n.º 1
0
 public Function(Craken _parent, Opcode[] _opcodes, string _name, FunctionArgument[] _args, Type _returns)
 {
     parent = _parent;
     iprivate = false;
     ivirtual = true;
     name = _name;
     args = _args;
     returns = _returns;
     opcodes = _opcodes;
 }
Exemplo n.º 2
0
        public Script(Craken _vm, string path)
        {
            vm = _vm;
            if (!File.Exists(path)) { throw new CrakenException(CrakenException.Exceptions.ScriptRead_FAIL); };
            string alltxt, temp;
            alltxt = File.ReadAllText(path);
            // prepare our source for parsing
            temp = vm.StrHelp.Clean(alltxt);
            alltxt = temp;
            // get script's filename. it'll be used as actual name
            string[] splt = path.Replace(@"\", ".").Split('.');
            name = splt[splt.Length - 2];

            Compile(alltxt);
        }
Exemplo n.º 3
0
 public ExpressionHelper(Craken _craken)
 {
     craken = _craken;
 }
Exemplo n.º 4
0
 public Lexer(Craken _craken)
 {
     craken = _craken;
 }