summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2021-07-13 22:51:27 -0700
committerWilfred Hughes <me@wilfred.me.uk>2021-07-13 22:52:13 -0700
commit8b382e435655e02d3ee4718afe42dff1eb8ce68b (patch)
treedb26b708c3b8abc62374a7a45c2b452c1a5f6b5f
parent74c2b8e9011ea252c48236a8fe1d6d1fa1c716cd (diff)
Improved OCaml handling0.4
Fixes #17 Fixes #15
-rw-r--r--CHANGELOG.md3
-rw-r--r--config/syntax.toml8
2 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c67d77ead..659b495ed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@
Improved parsing for Rust macro definitions and punctuation.
+Improved parsing for OCaml punctuation, and added `.mli` as an OCaml
+file extension.
+
### Diffing
Diff calculation is now significantly faster.
diff --git a/config/syntax.toml b/config/syntax.toml
index d2c587270..1ef5ec7bd 100644
--- a/config/syntax.toml
+++ b/config/syntax.toml
@@ -106,14 +106,16 @@ close_delimiter_pattern = '(\]|\}|\))'
[OCaml]
-extensions = ["ml"]
+extensions = ["ml", "mli"]
atom_patterns = [
# Numbers
'[0-9]+',
# Symbols (e.g. variable names)
'[.a-zA-Z0-9_]+',
- # Operators
- '[?~=<>/*+-,&|]',
+ # Two character operators
+ '(->|&&|\|\|)',
+ # Single character operators
+ "[?~=<>/*+-,&|:']",
]
string_patterns = [
# Double-quoted strings