compiling all directives into attrs hash first