eolian: introduce the keyword required
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Thu, 10 Jan 2019 11:10:47 +0000 (12:10 +0100)
committerJiyoun Park <jy0703.park@samsung.com>
Wed, 16 Jan 2019 02:26:53 +0000 (11:26 +0900)
commite0ad6f07a4757c5d79da764ae60036f4246553c9
tree5118cfec02b3b10c51ad97da271a7e0cc9be5dcb
parent0b85086a4523783b5c8ac4c74238b11ecb72b45e
eolian: introduce the keyword required

This introduces a new keyword called required. It only works on mixins.
You can specify a list of regular/abstract classes in there.
Classes specified after the required keyword are later used to verify
the usage of the mixin. With this feature a mixin can define a list of
types that the inheriting object (the object that inherits from a mixin)
needs to fullfill, if one class that is required is not in the
implemented classes, then eolian will bail out.

Differential Revision: https://phab.enlightenment.org/D7584
src/Makefile_Eolian.am
src/lib/eolian/database_validate.c
src/lib/eolian/eo_lexer.h
src/lib/eolian/eo_parser.c
src/lib/eolian/eolian_database.h
src/tests/eolian/data/class_requires.eo [new file with mode: 0644]
src/tests/eolian/data/mixins_require.eo [new file with mode: 0644]
src/tests/eolian/eolian_parsing.c