internal void GetMemCells() { var input = !Role.HasFlag(Roles.Description) ? new ScnSyntax.Comment().Replace(Text, "") : Text; var t = ScnMemCellCollection.Parse(ref input, FileParams, Rotoation); if (t.Count == 0) { FilesWithoutMemCells.Add(Path); } t.ToList().ForEach(x => MemCellCollection[x.Key] = x.Value); }
public static ScnMemCellCollection Parse(ref string text, List <string> param_list, V3D rotation) { var cells = new ScnMemCellCollection(); try { var lexer = new ScnNodeLexer(text, "memcell"); if (lexer.Nodes != null) { foreach (var node in lexer.Nodes) { var m = new ScnMemCell(node, param_list, rotation); cells.Add(m.Name, m); log.Trace("memcell, type {0}, name {1} params {2}", m.Type, m.Name, param_list); } } } catch (Exception x) { log.Error(x.Message + "\r\n" + x.StackTrace + "\r\n"); //System.Windows.Forms.MessageBox.Show(x.Message + "\r\n\r\n" + x.StackTrace); } return(cells); }