Skip to content

Commit 53967a4

Browse files
cgzonesdburgener
authored andcommitted
Allow empty m4 arguments
For example: ifelse(`$1',,, ` refpolicywarn(`dollar one defined') ')
1 parent e8c89d6 commit 53967a4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/parse.y

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,8 @@ m4_args:
706706
;
707707

708708
m4_argument:
709+
%empty
710+
|
709711
BACKTICK SINGLE_QUOTE
710712
|
711713
BACKTICK lines SINGLE_QUOTE

tests/sample_policy_files/uncommon.te

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,7 @@ ifdef(`foo',`
123123
define(`not_foo',`-foo_t')
124124

125125
define(`foobar')
126+
127+
ifelse(`$1',,, `
128+
refpolicywarn(`dollar one defined')
129+
')

0 commit comments

Comments
 (0)