Fix doc test.

This commit is contained in:
Stephen Chung 2022-09-25 23:45:51 +08:00
parent e9a270f6ba
commit 7d87a59315

View File

@ -172,7 +172,7 @@ impl Engine {
/// engine.on_parse_token(|token, _, _| { /// engine.on_parse_token(|token, _, _| {
/// match token { /// match token {
/// // Convert all integer literals to strings /// // Convert all integer literals to strings
/// Token::IntegerConstant(n) => Token::StringConstant(n.to_string().into()), /// Token::IntegerConstant(n) => Token::StringConstant(Box::new(n.to_string().into())),
/// // Convert 'begin' .. 'end' to '{' .. '}' /// // Convert 'begin' .. 'end' to '{' .. '}'
/// Token::Identifier(s) if &*s == "begin" => Token::LeftBrace, /// Token::Identifier(s) if &*s == "begin" => Token::LeftBrace,
/// Token::Identifier(s) if &*s == "end" => Token::RightBrace, /// Token::Identifier(s) if &*s == "end" => Token::RightBrace,