Commit Graph

12 Commits

Author SHA1 Message Date
jgmdev b0c005a5ac syntax: remove pattern re-ordering on optimization
* Introduces a flag that syntax writers can turn off named
  space_handling, turning it off means that your syntax will take care
  of handling the excessive amount of spaces that can slow down the
  tokenizer.
* Adds another pattern at the end of every single table that also
  improves tokenizer performance by matching words that weren't match by
  any of the synxtax patterns.
* Modifies language_md to turn off the provided space_handling and do its
  own since it has rules that require a space at the beginning, also
  handles long consecutives amount of dashes used in tables that degrade
  performance.
* This changes where discussed in collaboration with @Guldoman and
  @takase1121 thanks to all!
2022-03-29 22:11:14 -04:00
jgmdev e862fe9052 syntax: fix conflicts introduced with #896
* mainly the language_md got affected which has some exotic rules
* some other languages are also using spaces at start of pattern
  and even if not affected this change tackles that
2022-03-28 20:51:09 -04:00
Jefferson González 951f0913da
syntax: add pattern to boost tokenizer performance (#896) 2022-03-25 11:25:32 -04:00
Guldoman 5029e2ce29
Add name to plain text fallback syntax 2021-12-02 22:34:49 +01:00
Guldoman df665ddc38
Use `header` to get syntax only when provided 2021-10-25 14:06:07 +02:00
rxi ba6c14846b Added file-header pattern support to `syntax` 2020-06-08 16:11:22 +01:00
rxi ae42176953 Renamed `common.matches_pattern` => `common.match_pattern` 2020-05-07 14:18:46 +01:00
rxi 3057786ce2 Moved `matches_pattern` from `syntax` to `common` 2020-05-07 10:27:37 +01:00
rxi 764b43494e Moved .c, .lua and .md language syntaxes from core.syntax to plugins 2020-03-07 15:53:54 +00:00
rxi 42f7f81188 Added `union`, `short` and `long` keywords to .c syntax 2020-03-07 15:50:52 +00:00
rxi 719262a416 Added missing `volatile` keyword to C syntax 2020-01-25 13:54:42 +00:00
rxi d8c4bfa6ba Initial commit 2019-12-28 11:17:56 +00:00