mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch 'origin/GP-3029_CommentAnnotations'
This commit is contained in:
commit
fba98d104e
1 changed files with 13 additions and 0 deletions
|
@ -612,6 +612,19 @@ void PrintLanguage::emitLineComment(int4 indent,const Comment *comm)
|
|||
emit->tagLine();
|
||||
else if (tok=='\r') {
|
||||
}
|
||||
else if (tok=='{' && pos < text.size() && text[pos] == '@') {
|
||||
// Comment annotation
|
||||
int4 count = 1;
|
||||
while(pos < text.size()) {
|
||||
tok = text[pos];
|
||||
count += 1;
|
||||
pos += 1;
|
||||
if (tok == '}') break; // Search for brace ending the annotation
|
||||
}
|
||||
// Treat annotation as one token
|
||||
string annote = text.substr(pos-count,count);
|
||||
emit->tagComment(annote,EmitMarkup::comment_color,spc,off);
|
||||
}
|
||||
else {
|
||||
int4 count = 1;
|
||||
while(pos < text.size()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue