Improve handling of = and & in lisps

pull/25/head
Wilfred Hughes 2021-07-20 01:09:29 +07:00
parent aa28b26f48
commit 7bd8afc439
2 changed files with 12 additions and 7 deletions

@ -12,10 +12,13 @@ Improved parsing for Rust punctuation.
Improved parsing for OCaml punctuation, including `:=` and `method!`.
Improved parsing for Emacs Lisp symbols containing `+`, and
Improved parsing for Emacs Lisp symbols containing `+` and `=`, and
punctuation of `#`, `.` and `&`.
Improved parsing for Scheme punctuation of `#` and `.`.
Improved parsing for Scheme symbols containing `=`, and punctuation of
`#` and `.`.
Improved parsing of `=` and `&` in Clojure.
Improved parsing of string literals in all languages, supporting
escaped delimiters such as `"\""` and removing incorrect support for

@ -68,7 +68,7 @@ atom_patterns = [
# Numbers
'[0-9]+',
# Symbols (e.g. variable names)
'[a-zA-Z0-9_?:/*+-]+',
'[a-zA-Z0-9_?:/*+=-]+',
# Operators
"[`',#.&]",
]
@ -88,7 +88,7 @@ atom_patterns = [
# Numbers
'[0-9]+',
# Symbols (e.g. variable names)
'#?[a-zA-Z0-9_?:/*-]+',
'#?[a-zA-Z0-9_?:/*=-]+',
# Operators
"[`',#.]",
]
@ -132,9 +132,11 @@ atom_patterns = [
# Numbers
'[0-9]+',
# Symbols (e.g. variable names)
':?[a-zA-Z0-9_>+-]+',
# Operators
"[`'~@]",
':?[a-zA-Z0-9_>+=-]+',
# Two character operators
'(==)',
# Single character operators
"[`'~@&]",
]
string_patterns = [
# Double-quoted strings