0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00
bird/conf
Maria Matejka fc9d471b36 Filter: Methods rework
Methods can now be called as x.m(y), as long as x can have its type
inferred in config time. If used as a command, it modifies the object,
if used as a value, it keeps the original object intact.

Also functions add(x,y), delete(x,y), filter(x,y) and prepend(x,y) now
spit a warning and are considered deprecated.

It's also possible to call a method on a constant, see filter/test.conf
for examples like bgp_path = +empty+.prepend(1).

Inside instruction definitions (filter/f-inst.c), a METHOD_CONSTRUCTOR()
call is added, which registers the instruction as a method for the type
of its first argument. Each type has its own method symbol table and
filter parser switches between them based on the inferred type of the
object calling the method.

Also FI_CLIST_(ADD|DELETE|FILTER) instructions have been split to allow
for this method dispatch. With type inference, it's now possible.
2023-09-12 16:19:33 +02:00
..
cf-lex.l Filter: Methods rework 2023-09-12 16:19:33 +02:00
conf.c Conf: Symbol hashes for all scopes 2023-09-12 15:20:50 +02:00
conf.h Filter: Methods rework 2023-09-12 16:19:33 +02:00
confbase.Y Filter: Methods rework 2023-09-12 16:19:33 +02:00
Doc Doc: Rename code documentation files back to Doc 2018-12-14 02:03:42 +01:00
flowspec.Y Moved config-related allocations to config_pool and showing its size in memory usage 2022-11-01 16:38:24 +01:00
gen_commands.m4 Implements undo command and optional timeout for configuration 2012-12-26 12:40:48 +01:00
gen_keywords.m4 Filter: Methods rework 2023-09-12 16:19:33 +02:00
gen_parser.m4 Filter/Conf: Method names have their own keyword hash 2023-09-12 15:47:24 +02:00
Makefile Merge branch 'master' into HEAD 2019-03-18 12:54:40 +01:00