1
0
mirror of https://github.com/sharkdp/bat synced 2026-06-09 10:03:18 +00:00
Commit Graph

22 Commits

Author SHA1 Message Date
cyqsimon daf33709a0 Additional sanity check for matcher parser 2023-12-11 10:21:06 +08:00
cyqsimon 12fa2cb1eb - is not a legal character in variable name 2023-12-11 10:21:06 +08:00
cyqsimon 0c1b80faab Impl per-target syntax mappings 2023-12-11 10:21:05 +08:00
cyqsimon 2c9bf229e1 Add doc comment for BUILTIN_MAPPINGS 2023-12-11 10:21:05 +08:00
cyqsimon 822e81bb24 Suppress clippy warning for MappingTarget in build script 2023-12-11 10:21:05 +08:00
cyqsimon 4ad3002543 s/Lazy<GlobMatcher>/Lazy<Option<GlobMatcher>>/ 2023-12-11 10:21:05 +08:00
cyqsimon 1c7c9a6b6d Split syntax_mapping/builtin.rs 2023-12-11 10:21:05 +08:00
cyqsimon 0c93ca80f4 Guard against duplicate matchers in build script 2023-12-11 10:21:04 +08:00
cyqsimon de6d418d42 Remove BuiltinMatcher enum
Explanation added as comments in code
Using plain `Lazy<Option<GlobMatcher>>` is just better
2023-12-11 10:21:04 +08:00
cyqsimon c016b462c0 STATIC_RULES => BUILTIN_MAPPINGS 2023-12-11 10:21:04 +08:00
cyqsimon 075b5b288a Matcher parser errors when empty 2023-12-11 10:20:12 +08:00
cyqsimon 7cfd1e0d78 Rerun build script only when necessary 2023-12-11 10:20:12 +08:00
cyqsimon 9f7d70f642 Use regex for matcher parsing
- Somewhat better maintainability I think
2023-12-11 10:20:12 +08:00
cyqsimon 0fea82cff9 Minor improvement of variable naming accuracy 2023-12-11 10:20:11 +08:00
cyqsimon 64840fbbae join_segments -> build_glob_string
- this is a more descriptive name
2023-12-11 10:20:11 +08:00
cyqsimon 9478d2dfe8 Isolate variables at compile time 2023-12-11 10:20:11 +08:00
cyqsimon 9f4259721a Fix codegen type declaration 2023-12-11 10:20:11 +08:00
cyqsimon 77e491161c Ensure lexicographical ordering 2023-12-11 10:20:10 +08:00
cyqsimon 97780f987e MappingDefModel::into_mapping_list returns MappingList 2023-12-11 10:20:10 +08:00
cyqsimon d1bc0ef0d4 Build script codegen initial impl 2023-12-11 10:20:10 +08:00
cyqsimon 5498c24c33 Rerun build script only when necessary 2023-11-02 17:54:57 +01:00
cyqsimon 79a03b4299 Reorganise build script into modules 2023-11-02 17:54:57 +01:00