Use switch expression in yang-parser-impl