void DisassembleRecord(BamlContext ctx, BamlRecord record) { if (BamlNode.IsFooter(record)) { while (scopeStack.Count > 0 && !BamlNode.IsMatch(scopeStack.Peek(), record)) { scopeStack.Pop(); output.DecreaseIndent(); } if (scopeStack.Count > 0) { scopeStack.Pop(); output.DecreaseIndent(); } } output.Write(record.Type.ToString(), BamlToolTipReference.Create(GetRecordReference(record)), DecompilerReferenceFlags.Local | DecompilerReferenceFlags.Definition, BoxedTextColor.Keyword); if (handlerMap.TryGetValue(record.Type, out var handler)) { output.Write(" [", BoxedTextColor.Text); handler(ctx, record); output.Write("]", BoxedTextColor.Text); } output.WriteLine(); if (BamlNode.IsHeader(record)) { scopeStack.Push(record); output.IncreaseIndent(); } }
void StartKeywordBlock(IDecompilerOutput output, string keyword, IMemberDef member) { output.Write(keyword, BoxedTextColor.Keyword); output.Write(" ", BoxedTextColor.Text); output.Write(IdentifierEscaper.Escape(member.Name), member, DecompilerReferenceFlags.Definition, TextColorHelper.GetColor(member)); output.Write(" ", BoxedTextColor.Text); output.Write("{", BoxedTextColor.Punctuation); output.WriteLine(); output.IncreaseIndent(); }
BraceInfo StartKeywordBlock(IDecompilerOutput output, string keyword, IMemberDef member) { output.Write(keyword, BoxedTextColor.Keyword); output.Write(" ", BoxedTextColor.Text); output.Write(IdentifierEscaper.Escape(member.Name), member, DecompilerReferenceFlags.Definition, MetadataTextColorProvider.GetColor(member)); output.Write(" ", BoxedTextColor.Text); var start = output.NextPosition; output.Write("{", BoxedTextColor.Punctuation); output.WriteLine(); output.IncreaseIndent(); return(new BraceInfo(start)); }
void StartKeywordBlock(IDecompilerOutput output, string keyword, IMemberDef member) { output.Write(keyword, BoxedTextColor.Keyword); output.Write(" ", BoxedTextColor.Text); output.Write(IdentifierEscaper.Escape(member.Name), member, DecompilerReferenceFlags.Definition, MetadataTextColorProvider.GetColor(member)); output.Write(" ", BoxedTextColor.Text); output.Write("{", BoxedTextColor.Punctuation); output.WriteLine(); output.IncreaseIndent(); }
public void IncreaseIndent() => implementation.IncreaseIndent();
public void Indent() => output.IncreaseIndent();