Rust parser: try to distinguish characters from lifetimes

pull/25/head
Wilfred Hughes 2021-07-07 13:50:40 +07:00
parent be94cd97ee
commit e6df1dfaa2
1 changed files with 3 additions and 0 deletions

@ -149,6 +149,9 @@ extensions = ["rs"]
atom_patterns = [
# Numbers
'[0-9]+',
# Single quoted character 'a' or '\n', trying to avoid matching
# lifetimes.
"'..?'",
# Lifetimes
"'[a-z_]+",
# Symbols (e.g. variable names)