Ticket #1165: quote.jam
File quote.jam, 402 bytes (added by , 15 years ago) |
---|
Line | |
---|---|
1 | # quote.jam |
2 | # |
3 | # Copyright (c) 2007 |
4 | # Steven Watanabe |
5 | # |
6 | # Distributed under the Boost Software License, Version 1.0. (See |
7 | # accompanying file LICENSE_1_0.txt or copy at |
8 | # http://www.boost.org/LICENSE_1_0.txt |
9 | |
10 | import regex ; |
11 | |
12 | rule quote_string ( string ) |
13 | { |
14 | if ( [ regex.match (\".*\") : $(string) : 1 ] ) |
15 | { |
16 | return $(string) ; |
17 | } |
18 | else |
19 | { |
20 | return \"$(string)\" ; |
21 | } |
22 | } |