Skip to content

Commit 8bd26f4

Browse files
committed
Add span to GroupComment created from a skipped Section
1 parent 69951f2 commit 8bd26f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fluent/syntax/parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ def get_entry(self, ps):
103103
if ps.current_is('['):
104104
self.skip_section(ps)
105105
if comment:
106-
return ast.GroupComment(comment.content)
106+
group_comment = ast.GroupComment(comment.content)
107+
if self.with_spans:
108+
group_comment.span = comment.span
109+
return group_comment
107110
return None
108111

109112
if ps.is_entry_id_start() \

0 commit comments

Comments
 (0)