summaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2014-02-17 00:05:40 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2014-03-03 10:51:50 +1100
commit827ac8eca016c39b13fc916bbdb16f9f2fe3c34c (patch)
treee7369759973f262d99a57641c1d503d7d15e379e /dtc.h
parent9a8a1f41dd1ba0d8612f2177ec58e22eff312055 (diff)
downloaddevice-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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/dtc.h b/dtc.h
index d270626..d3f8ad0 100644
--- a/dtc.h
+++ b/dtc.h
@@ -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 *,