For pedagogical purposes, it would be usefull to capture "console error" rather than "parser error".
2 2
#> Error: unexpected numeric constant in "2 2"
mytext <- "5 5"
parse(text=mytext)
#> Error in parse(text = mytext): <text>:1:3: unexpected numeric constant
#> 1: 5 5
#> ^
evaluate::evaluate(mytext)[[2]]
#> <simpleError: <text>:1:3: unexpected numeric constant
#> 1: 5 5
#> ^>
sessioninfo::package_info("evaluate")
#> package * version date lib source
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.4)
#>
#> [1] C:/Program Files/R/R-4.0.4/library
message(paste("Error:", pander::evals(mytext)[[1]]$msg$errors))
#> Error: Unexpected numeric constant at character 3 in line 1: ` 5 5`