public void AddIncludedFile(string path, LuaModel model) { if (IncludedFiles.ContainsKey(path)) { IncludedFiles[path] = model; } else { IncludedFiles.Add(path, model); } }
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)); } } }); }