From 0bd223f032e9bfc92dde4fc7bb83164b16bb039c Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Tue, 27 Oct 2020 13:11:57 -0400 Subject: [PATCH] Better naming for this regex. --- cli/src/query_testing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/query_testing.rs b/cli/src/query_testing.rs index 9618d1f6..8c6af706 100644 --- a/cli/src/query_testing.rs +++ b/cli/src/query_testing.rs @@ -7,7 +7,7 @@ use std::fs; use tree_sitter::{Language, Parser, Point}; lazy_static! { - static ref HIGHLIGHT_NAME_REGEX: Regex = Regex::new("[\\w_\\-.]+").unwrap(); + static ref PROPERTY_NAME_REGEX: Regex = Regex::new("[\\w_\\-.]+").unwrap(); } #[derive(Debug, Eq, PartialEq)] @@ -76,7 +76,7 @@ pub fn parse_position_comments( // If the comment node contains an arrow and a highlight name, record the // highlight name and the position. if let (true, Some(mat)) = - (has_arrow, HIGHLIGHT_NAME_REGEX.find(&text[arrow_end..])) + (has_arrow, PROPERTY_NAME_REGEX.find(&text[arrow_end..])) { assertion_ranges.push((node.start_position(), node.end_position())); result.push(Assertion {