switch context macros to functions, regressions in array parsing