]> git.ipfire.org Git - thirdparty/nftables.git/commit
scanner: munch full comment lines
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 6 Dec 2022 21:59:55 +0000 (22:59 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Dec 2022 18:18:19 +0000 (19:18 +0100)
commit931737a1719824d7945433177e61a6c47530ed69
tree8b98915c6e415205d0d1cd9601a4980cc62a8c1f
parent84da9b6e335b7aa5bdcf1bd88c62daed5bdac889
scanner: munch full comment lines

Munch lines full comment lines, regular expression matches lines that
start by space or tab, then # follows, finally anything including one
single line break.

Call reset_pos() to ensure error reporting location is not puzzled.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1196
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/scanner.l
tests/shell/testcases/comments/comments_0 [new file with mode: 0755]
tests/shell/testcases/comments/dumps/comments_0.nft [new file with mode: 0644]