[parsing] Fix match syntax and add const