move parse functions to parser.dart