Skip to content

Commit

Permalink
skip comments in lists
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeDR committed Mar 16, 2020
1 parent a34ff30 commit 63b9e3c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/hcl/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,16 @@ def p_listitems_4(self, p):
p[2].insert(0, p[1])
p[0] = p[2]

def p_listitems_5(self, p):
'''
listitems : listitems COMMA COMMENT
| listitems COMMA MULTICOMMENT
'''
# skip comments in lists
if DEBUG:
self.print_p(p)
p[0] = p[1]

def p_listitem_0(self, p):
'''
listitem : number
Expand Down

0 comments on commit 63b9e3c

Please sign in to comment.