diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2014-02-17 00:05:40 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2014-03-03 10:51:50 +1100 |
commit | 827ac8eca016c39b13fc916bbdb16f9f2fe3c34c (patch) | |
tree | e7369759973f262d99a57641c1d503d7d15e379e /dtc.h | |
parent | 9a8a1f41dd1ba0d8612f2177ec58e22eff312055 (diff) | |
download | device-tree-compiler-827ac8eca016c39b13fc916bbdb16f9f2fe3c34c.tar.gz |
Implement string concatenate and repeat operatorsexpressions
This patch exercises the new expression infrastructure to implement syntax
to concatenate and repeat strings. We use syntax inspired by Python,
with '+' overloaded for string concatenation and '*' overloaded for string
repeat. Normally we'd use C syntax to inspire dts syntax, but C has no
obvious candidates for these string operators.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.h')
-rw-r--r-- | dtc.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -302,6 +302,10 @@ DEF_BINARY_OP(logic_and); DEF_BINARY_OP(logic_or); +struct expression *expression_concat(struct srcpos *pos, + struct expression *arg0, + struct expression *arg1); + struct expression *expression_conditional(struct srcpos *pos, struct expression *, struct expression *, |