Example #1
0
 public void AddIncludedFile(string path, LuaModel model)
 {
     if (IncludedFiles.ContainsKey(path))
     {
         IncludedFiles[path] = model;
     }
     else
     {
         IncludedFiles.Add(path, model);
     }
 }
Example #2
0
        public async void InitModel()
        {
            await Task.Run(() => {
                lock (_parselock)
                {
                    string source       = File.ReadAllText(_path);
                    ParseTree parseTree = _parser.Parse(source);
                    _model = new LuaModel(parseTree, this);

                    if (NewParseTree != null)
                    {
                        NewParseTree(this, new ParseTreeChangedEventArgs(parseTree));
                    }
                }
            });
        }