mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 20:11:03 +00:00
Add performance patch for Makefile syntax
Thanks to @keith-hall! closes #750
This commit is contained in:
parent
61e47e0c13
commit
0ecc94956b
@ -10,6 +10,7 @@
|
||||
## Bugfixes
|
||||
|
||||
- Performance problems with C# source code have been fixed, see #677 (@keith-hall)
|
||||
- Performance problems with Makefiles have been fixed, see #750 (@keith-hall)
|
||||
|
||||
## Other
|
||||
|
||||
|
81
assets/patches/Makefile.sublime-syntax.patch
vendored
Normal file
81
assets/patches/Makefile.sublime-syntax.patch
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
diff --git syntaxes/01_Packages/Makefile/Makefile.sublime-syntax syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
|
||||
index 3cc3a97e..0c7a3f24 100644
|
||||
--- syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
|
||||
+++ syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
|
||||
@@ -44,64 +44,50 @@ variables:
|
||||
# variable substitutions anywhere. We try to remedy this by hacking in a
|
||||
# regex that matches up to four levels of nested parentheses, and ignores
|
||||
# whatever's inside the parentheses.
|
||||
- nps: '[^()]*'
|
||||
- open: '(?:\('
|
||||
- close: '\))?' # ignore this invalid.illegal
|
||||
+ nps_unnested: '[^()]*'
|
||||
+ nps: '[^()]*(?=[()])'
|
||||
+ open: '(?:{{nps}}\('
|
||||
+ close: '\){{nps_unnested}})?' # ignore this invalid.illegal
|
||||
just_eat: | # WARNING: INSANITY FOLLOWS!
|
||||
- (?x) # ignore whitespace in this regex
|
||||
- {{nps}} # level 0
|
||||
+ (?x)(?: # ignore whitespace in this regex
|
||||
{{open}} # start level 1 __
|
||||
- {{nps}} # level 1 _______ /*_>-<
|
||||
{{open}} # start level 2 ___/ _____ \__/ /
|
||||
- {{nps}} # level 2 <____/ \____/
|
||||
{{open}} # start level 3 is like snek... (by Valerie Haecky)
|
||||
- {{nps}} # level 3
|
||||
{{open}} # start level 4
|
||||
{{nps}} # level 4
|
||||
{{close}} # end level 4
|
||||
- {{nps}} # level 3
|
||||
{{close}} # end level 3
|
||||
- {{nps}} # level 2
|
||||
{{open}} # start level 3
|
||||
- {{nps}} # level 3
|
||||
{{open}} # start level 4
|
||||
{{nps}} # level 4
|
||||
{{close}} # end level 4
|
||||
- {{nps}} # level 3
|
||||
{{close}} # end level 3
|
||||
- {{nps}} # level 2
|
||||
+ {{nps}}
|
||||
{{close}} # end level 2
|
||||
- {{nps}} # level 1
|
||||
{{open}} # start level 2
|
||||
- {{nps}} # level 2
|
||||
{{open}} # start level 3
|
||||
- {{nps}} # level 3
|
||||
{{open}} # start level 4
|
||||
{{nps}} # level 4
|
||||
{{close}} # end level 4
|
||||
- {{nps}} # level 3
|
||||
+ {{nps}}
|
||||
{{close}} # end level 3
|
||||
- {{nps}} # level 2
|
||||
{{open}} # start level 3
|
||||
- {{nps}} # level 3
|
||||
{{open}} # start level 4
|
||||
{{nps}} # level 4
|
||||
{{close}} # end level 4
|
||||
- {{nps}} # level 3
|
||||
+ {{nps}}
|
||||
{{close}} # end level 3
|
||||
- {{nps}} # level 2
|
||||
{{open}} # start level 3
|
||||
- {{nps}} # level 3
|
||||
{{open}} # start level 4
|
||||
{{nps}} # level 4
|
||||
{{close}} # end level 4
|
||||
- {{nps}} # level 3
|
||||
+ {{nps}}
|
||||
{{close}} # end level 3
|
||||
- {{nps}} # level 2
|
||||
+ {{nps}}
|
||||
{{close}} # end level 2
|
||||
- {{nps}} # level 1
|
||||
+ {{nps}}
|
||||
{{close}} # end level 1
|
||||
- {{nps}} # level 0
|
||||
+ |{{nps_unnested}})
|
||||
rule_lookahead: '{{just_eat}}{{ruleassign}}{{just_eat}}'
|
||||
|
||||
var_lookahead_base: '{{just_eat}}({{varassign}}|{{shellassign}}){{just_eat}}'
|
Loading…
x
Reference in New Issue
Block a user