void Relabelling(out PreProcessActions preproc) { preproc = null; string relabelTo, relabelFrom; RelabelActions labels = new RelabelActions(); Expect(21); Token first = t; if (la.kind == 6) { Get(); preproc = new CustomPreprocess(t.val.Replace(":", "")); SetPos(preproc, first); } else if (la.kind == 3) { Get(); relabelTo = t.val; SetPos(labels, first); Expect(22); Expect(3); relabelFrom = t.val; labels.Add(relabelFrom, relabelTo); while (la.kind == 11) { Get(); Expect(3); relabelTo = t.val; Expect(22); Expect(3); relabelFrom = t.val; labels.Add(relabelFrom, relabelTo); } preproc = labels; } else { SynErr(44); } Expect(23); }
public override void Visit(RelabelActions relabel) { foreach (KeyValuePair <string, string> kv in relabel.Mapping) { if (!_mappings.Contains(kv)) { _mappings.Add(kv); } } }
public override void Visit(RelabelActions actions) { PopChildren(); StringBuilder sb = new StringBuilder(); foreach (string key in actions.Mapping.Keys) { sb.Append(actions.Mapping[key] + "/" + key + ", "); } sb.Remove(sb.Length - 2, 2); Return("<sub>[" + sb.ToString() + "]</sub>"); }
public virtual void Visit(RelabelActions actions) { }