コード例 #1
0
ファイル: Function.cs プロジェクト: HeapSpray/Craken
 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;
 }
コード例 #2
0
ファイル: Script.cs プロジェクト: HeapSpray/Craken
        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);
        }
コード例 #3
0
ファイル: ExpressionHelper.cs プロジェクト: HeapSpray/Craken
 public ExpressionHelper(Craken _craken)
 {
     craken = _craken;
 }
コード例 #4
0
ファイル: Lexer.cs プロジェクト: HeapSpray/Craken
 public Lexer(Craken _craken)
 {
     craken = _craken;
 }