def parse_annotations(self, ctx, symbol):
assert ctx and symbol
if ctx.comment:
comment = ctx.comment.text
symbol.comment = comment
if ctx.tagSymbol():
lines = [tag.line.text[1:] for tag in ctx.tagSymbol()]
try:
data = yaml.load('\n'.join(lines), Loader=Loader)
symbol._tags = data
except yaml.YAMLError as exc:
click.secho(exc, fg='red')
评论列表
文章目录