]> git.ipfire.org Git - thirdparty/bird.git/commit
Filter: Implement mixed declarations of local variables
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 10 Mar 2022 00:02:45 +0000 (01:02 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 10 Mar 2022 01:02:32 +0000 (02:02 +0100)
commit8216114841ec5ba9a58291956ec6466f27fb8f1f
tree5f3c2f62bbc8c365a9f9fd23e52ab0429c3cf7b4
parent9654b1416ee82fc7f9b09beb7cb284f7775f280b
Filter: Implement mixed declarations of local variables

Allow variable declarations mixed with code, also in nested blocks with
proper scoping, and with variable initializers. E.g:

function fn(int a)
{
  int b;
  int c = 10;

  if a > 20 then
  {
    b = 30;
    int d = c * 2;
    print a, b, c, d;
  }

  string s = "Hello";
}
doc/bird.sgml
filter/config.Y
filter/f-inst.c
filter/test.conf