mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
d: add api.value.type union support
The union of the values is handled by the backend. In D, unions can hold classes, structs, etc., so this is more similar to the C++ api.value.type variant. * data/skeletons/d.m4, data/skeletons/lalr1.d: Here. * tests/calc.at, tests/local.at: Test it.
This commit is contained in:
@@ -319,6 +319,8 @@ m4_pushdef([AT_UNION_IF],
|
||||
[m4_bmatch([$3], [%define api\.value\.type union], [$1], [$2])])
|
||||
m4_pushdef([AT_VARIANT_IF],
|
||||
[m4_bmatch([$3], [%define api\.value\.type variant], [$1], [$2])])
|
||||
m4_pushdef([AT_UNION_IF],
|
||||
[m4_bmatch([$3], [%define api\.value\.type union], [$1], [$2])])
|
||||
m4_pushdef([AT_API_prefix],
|
||||
[m4_bmatch([$3], [%define api\.prefix {.*}],
|
||||
[m4_bregexp([$3], [%define api\.prefix {\([^\}]*\)}], [\1])],
|
||||
|
||||
Reference in New Issue
Block a user