Skip to content

Commit

Permalink
Fix #1019
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
  • Loading branch information
jeremiedimino authored and rgrinberg committed Jul 19, 2018
1 parent 68df27c commit 8858848
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/usexp/dune_lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ and quoted_string_after_escaped_newline = parse
{ quoted_string lexbuf }
and template_variable = parse
| (varname_char+ as name) (':' (varname_char* as payload))? '}'
| (varname_char+ as name) (':' ((':' | varname_char)* as payload))? '}'
{ let payload =
match payload with
| Some "" -> error lexbuf "payload after : in variable cannot be empty"
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/github1019/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(library (name foo))
(library (name foo) (public_name foo))

(alias
(name default)
(echo %{lib:foo:foo.ml}))
(action (echo %{lib:foo:foo.ml})))
Empty file.
4 changes: 1 addition & 3 deletions test/blackbox-tests/test-cases/github1019/run.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Regression test for #1019

$ dune build
File "dune", line 5, characters 9-10:
Error: This character is not allowed inside %{...} forms
[1]
../install/default/lib/foo/foo.ml

0 comments on commit 8858848

Please sign in to comment.