Fixed lifetime errors in parser.rs