| 1 |
use std::borrow::Cow; |
| 2 |
use std::cmp; |
| 3 |
use std::fmt; |
| 4 |
use std::mem::replace; |
| 5 |
use std::num::NonZeroU32; |
| 6 |
use std::ops::RangeBounds; |
| 7 |
use std::slice; |
| 8 |
use std::sync::Arc; |
| 9 |
|
| 10 |
use crate::config::{LanguageConfig, LanguageLoader}; |
| 11 |
use crate::locals::ScopeCursor; |
| 12 |
use crate::query_iter::{MatchedNode, QueryIter, QueryIterEvent, QueryLoader}; |
| 13 |
use crate::{Injection, Language, Layer, Syntax}; |
| 14 |
use arc_swap::ArcSwap; |
| 15 |
use hashbrown::{HashMap, HashSet}; |
| 16 |
use ropey::RopeSlice; |
| 17 |
use tree_sitter::{ |
| 18 |
query::{self, InvalidPredicateError, Query, UserPredicate}, |
| 19 |
Capture, Grammar, |
| 20 |
}; |
| 21 |
use tree_sitter::{Pattern, QueryMatch}; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
#[derive(Debug)] |
| 27 |
pub struct HighlightQuery { |
| 28 |
pub query: Query, |
| 29 |
highlight_indices: ArcSwap<Vec<Option<Highlight>>>, |
| 30 |
#[allow(dead_code)] |
| 31 |
|
| 32 |
non_local_patterns: HashSet<Pattern>, |
| 33 |
local_reference_capture: Option<Capture>, |
| 34 |
|
| 35 |
|
| 36 |
first_locals_pattern: Pattern, |
| 37 |
} |
| 38 |
|
| 39 |
impl HighlightQuery { |
| 40 |
pub(crate) fn new( |
| 41 |
grammar: Grammar, |
| 42 |
highlight_query_text: &str, |
| 43 |
local_query_text: &str, |
| 44 |
) -> Result<Self, query::ParseError> { |
| 45 |
|
| 46 |
let mut query_source = |
| 47 |
String::with_capacity(highlight_query_text.len() + local_query_text.len()); |
| 48 |
query_source.push_str(highlight_query_text); |
| 49 |
query_source.push_str(local_query_text); |
| 50 |
|
| 51 |
let mut non_local_patterns = HashSet::new(); |
| 52 |
let mut query = Query::new(grammar, &query_source, |pattern, predicate| { |
| 53 |
match predicate { |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
UserPredicate::SetProperty { |
| 58 |
key: "local.scope-inherits", |
| 59 |
.. |
| 60 |
} => (), |
| 61 |
|
| 62 |
|
| 63 |
UserPredicate::IsPropertySet { |
| 64 |
negate: true, |
| 65 |
key: "local", |
| 66 |
val: None, |
| 67 |
} => { |
| 68 |
non_local_patterns.insert(pattern); |
| 69 |
} |
| 70 |
_ => return Err(InvalidPredicateError::unknown(predicate)), |
| 71 |
} |
| 72 |
Ok(()) |
| 73 |
})?; |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
let first_locals_pattern = query |
| 79 |
.patterns() |
| 80 |
.find(|&p| query.start_byte_for_pattern(p) >= highlight_query_text.len()) |
| 81 |
.unwrap_or(Pattern::SENTINEL); |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
query.disable_capture("local.scope"); |
| 86 |
let local_definition_captures: Vec<_> = query |
| 87 |
.captures() |
| 88 |
.filter(|&(_, name)| name.starts_with("local.definition.")) |
| 89 |
.map(|(_, name)| Box::<str>::from(name)) |
| 90 |
.collect(); |
| 91 |
for name in local_definition_captures { |
| 92 |
query.disable_capture(&name); |
| 93 |
} |
| 94 |
|
| 95 |
Ok(Self { |
| 96 |
highlight_indices: ArcSwap::from_pointee(vec![None; query.num_captures() as usize]), |
| 97 |
non_local_patterns, |
| 98 |
local_reference_capture: query.get_capture("local.reference"), |
| 99 |
first_locals_pattern, |
| 100 |
query, |
| 101 |
}) |
| 102 |
} |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
pub(crate) fn configure(&self, f: &mut impl FnMut(&str) -> Option<Highlight>) { |
| 121 |
let highlight_indices = self |
| 122 |
.query |
| 123 |
.captures() |
| 124 |
.map(|(_, capture_name)| f(capture_name)) |
| 125 |
.collect(); |
| 126 |
self.highlight_indices.store(Arc::new(highlight_indices)); |
| 127 |
} |
| 128 |
} |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
#[derive(Copy, Clone, PartialEq, Eq, Hash)] |
| 135 |
pub struct Highlight(NonZeroU32); |
| 136 |
|
| 137 |
impl Highlight { |
| 138 |
pub const MAX: u32 = u32::MAX - 1; |
| 139 |
|
| 140 |
pub const fn new(inner: u32) -> Self { |
| 141 |
assert!(inner != u32::MAX); |
| 142 |
|
| 143 |
Self(unsafe { NonZeroU32::new_unchecked(inner ^ u32::MAX) }) |
| 144 |
} |
| 145 |
|
| 146 |
pub const fn get(&self) -> u32 { |
| 147 |
self.0.get() ^ u32::MAX |
| 148 |
} |
| 149 |
|
| 150 |
pub const fn idx(&self) -> usize { |
| 151 |
self.get() as usize |
| 152 |
} |
| 153 |
} |
| 154 |
|
| 155 |
impl fmt::Debug for Highlight { |
| 156 |
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 157 |
f.debug_tuple("Highlight").field(&self.get()).finish() |
| 158 |
} |
| 159 |
} |
| 160 |
|
| 161 |
#[derive(Debug)] |
| 162 |
struct HighlightedNode { |
| 163 |
end: u32, |
| 164 |
highlight: Highlight, |
| 165 |
} |
| 166 |
|
| 167 |
#[derive(Debug, Default)] |
| 168 |
pub struct LayerData { |
| 169 |
parent_highlights: usize, |
| 170 |
dormant_highlights: Vec<HighlightedNode>, |
| 171 |
} |
| 172 |
|
| 173 |
pub struct Highlighter<'a, 'tree, Loader: LanguageLoader> { |
| 174 |
query: QueryIter<'a, 'tree, HighlightQueryLoader<&'a Loader>, ()>, |
| 175 |
next_query_event: Option<QueryIterEvent<'tree, ()>>, |
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
active_highlights: Vec<HighlightedNode>, |
| 191 |
next_highlight_end: u32, |
| 192 |
next_highlight_start: u32, |
| 193 |
active_config: Option<&'a LanguageConfig>, |
| 194 |
|
| 195 |
|
| 196 |
active_highlight_indices: Option<Arc<Vec<Option<Highlight>>>>, |
| 197 |
active_local_definition_captures: Option<Arc<HashMap<Capture, Highlight>>>, |
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
current_layer: Layer, |
| 204 |
layer_states: HashMap<Layer, LayerData>, |
| 205 |
} |
| 206 |
|
| 207 |
pub struct HighlightList<'a>(slice::Iter<'a, HighlightedNode>); |
| 208 |
|
| 209 |
impl Iterator for HighlightList<'_> { |
| 210 |
type Item = Highlight; |
| 211 |
|
| 212 |
fn next(&mut self) -> Option<Highlight> { |
| 213 |
self.0.next().map(|node| node.highlight) |
| 214 |
} |
| 215 |
|
| 216 |
fn size_hint(&self) -> (usize, Option<usize>) { |
| 217 |
self.0.size_hint() |
| 218 |
} |
| 219 |
} |
| 220 |
|
| 221 |
impl DoubleEndedIterator for HighlightList<'_> { |
| 222 |
fn next_back(&mut self) -> Option<Self::Item> { |
| 223 |
self.0.next_back().map(|node| node.highlight) |
| 224 |
} |
| 225 |
} |
| 226 |
|
| 227 |
impl ExactSizeIterator for HighlightList<'_> { |
| 228 |
fn len(&self) -> usize { |
| 229 |
self.0.len() |
| 230 |
} |
| 231 |
} |
| 232 |
|
| 233 |
#[derive(Debug, Clone, Copy, PartialEq, Eq)] |
| 234 |
pub enum HighlightEvent { |
| 235 |
|
| 236 |
Refresh, |
| 237 |
|
| 238 |
Push, |
| 239 |
} |
| 240 |
|
| 241 |
impl<'a, 'tree: 'a, Loader: LanguageLoader> Highlighter<'a, 'tree, Loader> { |
| 242 |
pub fn new( |
| 243 |
syntax: &'tree Syntax, |
| 244 |
src: RopeSlice<'a>, |
| 245 |
loader: &'a Loader, |
| 246 |
range: impl RangeBounds<u32>, |
| 247 |
) -> Self { |
| 248 |
let mut query = QueryIter::new(syntax, src, HighlightQueryLoader(loader), range); |
| 249 |
let active_language = query.current_language(); |
| 250 |
let active_config = query.loader().0.get_config(active_language); |
| 251 |
let mut res = Highlighter { |
| 252 |
active_config: None, |
| 253 |
active_highlight_indices: None, |
| 254 |
active_local_definition_captures: None, |
| 255 |
next_query_event: None, |
| 256 |
current_layer: query.current_layer(), |
| 257 |
layer_states: Default::default(), |
| 258 |
active_highlights: Vec::new(), |
| 259 |
next_highlight_end: u32::MAX, |
| 260 |
next_highlight_start: 0, |
| 261 |
query, |
| 262 |
}; |
| 263 |
res.set_active_config(active_config); |
| 264 |
res.advance_query_iter(); |
| 265 |
res |
| 266 |
} |
| 267 |
|
| 268 |
|
| 269 |
fn set_active_config(&mut self, config: Option<&'a LanguageConfig>) { |
| 270 |
self.active_config = config; |
| 271 |
|
| 272 |
|
| 273 |
self.active_highlight_indices = |
| 274 |
config.map(|config| config.highlight_query.highlight_indices.load_full()); |
| 275 |
self.active_local_definition_captures = |
| 276 |
config.map(|config| config.injection_query.local_definition_captures.load_full()); |
| 277 |
} |
| 278 |
|
| 279 |
pub fn active_highlights(&self) -> HighlightList<'_> { |
| 280 |
HighlightList(self.active_highlights.iter()) |
| 281 |
} |
| 282 |
|
| 283 |
pub fn next_event_offset(&self) -> u32 { |
| 284 |
self.next_highlight_start.min(self.next_highlight_end) |
| 285 |
} |
| 286 |
|
| 287 |
pub fn advance(&mut self) -> (HighlightEvent, HighlightList<'_>) { |
| 288 |
let mut refresh = false; |
| 289 |
|
| 290 |
let pos = self.next_event_offset(); |
| 291 |
if self.next_highlight_end == pos { |
| 292 |
self.process_highlight_end(pos); |
| 293 |
refresh = true; |
| 294 |
} |
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
let prev_stack_size = self.active_highlights.len(); |
| 302 |
|
| 303 |
let mut first_highlight = true; |
| 304 |
let mut local_ref_candidate: Option<(u32, Highlight)> = None; |
| 305 |
while self.next_highlight_start == pos { |
| 306 |
let Some(query_event) = self.advance_query_iter() else { |
| 307 |
break; |
| 308 |
}; |
| 309 |
match query_event { |
| 310 |
QueryIterEvent::EnterInjection(injection) => self.enter_injection(injection.layer), |
| 311 |
QueryIterEvent::Match(node) => self.start_highlight( |
| 312 |
node, |
| 313 |
&mut first_highlight, |
| 314 |
prev_stack_size, |
| 315 |
&mut local_ref_candidate, |
| 316 |
), |
| 317 |
QueryIterEvent::ExitInjection { injection, state } => { |
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
let layer_is_finished = state.is_some() |
| 325 |
&& self |
| 326 |
.current_layer_highlights() |
| 327 |
.iter() |
| 328 |
.all(|h| h.end <= injection.range.end); |
| 329 |
if layer_is_finished { |
| 330 |
self.layer_states.remove(&injection.layer); |
| 331 |
} else { |
| 332 |
self.deactivate_layer(injection); |
| 333 |
refresh = true; |
| 334 |
} |
| 335 |
let active_language = self.query.syntax().layer(self.current_layer).language; |
| 336 |
let config = self.query.loader().0.get_config(active_language); |
| 337 |
self.set_active_config(config); |
| 338 |
} |
| 339 |
} |
| 340 |
} |
| 341 |
|
| 342 |
if let Some((end, highlight)) = local_ref_candidate { |
| 343 |
let node = HighlightedNode { end, highlight }; |
| 344 |
let search_start = prev_stack_size.min(self.active_highlights.len()); |
| 345 |
let insert_position = self.active_highlights[search_start..] |
| 346 |
.iter() |
| 347 |
.rposition(|h| h.end <= end) |
| 348 |
.map(|rel_idx| rel_idx + search_start); |
| 349 |
match insert_position { |
| 350 |
Some(idx) => match self.active_highlights[idx].end.cmp(&end) { |
| 351 |
cmp::Ordering::Equal => self.active_highlights[idx] = node, |
| 352 |
cmp::Ordering::Less => self.active_highlights.insert(idx, node), |
| 353 |
cmp::Ordering::Greater => unreachable!(), |
| 354 |
}, |
| 355 |
None => self.active_highlights.extend(Some(node)), |
| 356 |
} |
| 357 |
} |
| 358 |
|
| 359 |
self.next_highlight_end = self |
| 360 |
.active_highlights |
| 361 |
.last() |
| 362 |
.map_or(u32::MAX, |node| node.end); |
| 363 |
|
| 364 |
if refresh { |
| 365 |
( |
| 366 |
HighlightEvent::Refresh, |
| 367 |
HighlightList(self.active_highlights.iter()), |
| 368 |
) |
| 369 |
} else { |
| 370 |
( |
| 371 |
HighlightEvent::Push, |
| 372 |
HighlightList(self.active_highlights[prev_stack_size..].iter()), |
| 373 |
) |
| 374 |
} |
| 375 |
} |
| 376 |
|
| 377 |
fn advance_query_iter(&mut self) -> Option<QueryIterEvent<'tree, ()>> { |
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
self.current_layer = self.query.current_layer(); |
| 383 |
let event = replace(&mut self.next_query_event, self.query.next()); |
| 384 |
self.next_highlight_start = self |
| 385 |
.next_query_event |
| 386 |
.as_ref() |
| 387 |
.map_or(u32::MAX, |event| event.start_byte()); |
| 388 |
event |
| 389 |
} |
| 390 |
|
| 391 |
fn process_highlight_end(&mut self, pos: u32) { |
| 392 |
let i = self |
| 393 |
.active_highlights |
| 394 |
.iter() |
| 395 |
.rposition(|highlight| highlight.end != pos) |
| 396 |
.map_or(0, |i| i + 1); |
| 397 |
self.active_highlights.truncate(i); |
| 398 |
} |
| 399 |
|
| 400 |
fn current_layer_highlights(&self) -> &[HighlightedNode] { |
| 401 |
let parent_start = self |
| 402 |
.layer_states |
| 403 |
.get(&self.current_layer) |
| 404 |
.map(|layer| layer.parent_highlights) |
| 405 |
.unwrap_or_default() |
| 406 |
.min(self.active_highlights.len()); |
| 407 |
&self.active_highlights[parent_start..] |
| 408 |
} |
| 409 |
|
| 410 |
fn enter_injection(&mut self, layer: Layer) { |
| 411 |
debug_assert_eq!(layer, self.current_layer); |
| 412 |
let active_language = self.query.syntax().layer(layer).language; |
| 413 |
let config = self.query.loader().0.get_config(active_language); |
| 414 |
self.set_active_config(config); |
| 415 |
|
| 416 |
let state = self.layer_states.entry(layer).or_default(); |
| 417 |
state.parent_highlights = self.active_highlights.len(); |
| 418 |
self.active_highlights.append(&mut state.dormant_highlights); |
| 419 |
} |
| 420 |
|
| 421 |
fn deactivate_layer(&mut self, injection: Injection) { |
| 422 |
let LayerData { |
| 423 |
mut parent_highlights, |
| 424 |
ref mut dormant_highlights, |
| 425 |
.. |
| 426 |
} = self.layer_states.get_mut(&injection.layer).unwrap(); |
| 427 |
parent_highlights = parent_highlights.min(self.active_highlights.len()); |
| 428 |
dormant_highlights.extend(self.active_highlights.drain(parent_highlights..)); |
| 429 |
self.process_highlight_end(injection.range.end); |
| 430 |
} |
| 431 |
|
| 432 |
fn start_highlight( |
| 433 |
&mut self, |
| 434 |
node: MatchedNode, |
| 435 |
first_highlight: &mut bool, |
| 436 |
prev_stack_size: usize, |
| 437 |
local_ref_candidate: &mut Option<(u32, Highlight)>, |
| 438 |
) { |
| 439 |
let range = node.node.byte_range(); |
| 440 |
|
| 441 |
debug_assert!( |
| 442 |
!range.is_empty(), |
| 443 |
"QueryIter should not emit matches with empty ranges" |
| 444 |
); |
| 445 |
|
| 446 |
let config = self |
| 447 |
.active_config |
| 448 |
.expect("must have an active config to emit matches"); |
| 449 |
|
| 450 |
let is_local_reference = |
| 451 |
Some(node.capture) == config.highlight_query.local_reference_capture; |
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
if node.pattern >= config.highlight_query.first_locals_pattern && !is_local_reference { |
| 457 |
if local_ref_candidate.is_some_and(|(end, _)| end == range.end) { |
| 458 |
*local_ref_candidate = None; |
| 459 |
} |
| 460 |
return; |
| 461 |
} |
| 462 |
|
| 463 |
let highlight = if is_local_reference { |
| 464 |
|
| 465 |
|
| 466 |
let text: Cow<str> = self |
| 467 |
.query |
| 468 |
.source() |
| 469 |
.byte_slice(range.start as usize..range.end as usize) |
| 470 |
.into(); |
| 471 |
let Some(definition) = self |
| 472 |
.query |
| 473 |
.syntax() |
| 474 |
.layer(self.current_layer) |
| 475 |
.locals |
| 476 |
.lookup_reference(node.scope, &text) |
| 477 |
.filter(|def| range.start >= def.range.end) |
| 478 |
else { |
| 479 |
return; |
| 480 |
}; |
| 481 |
let highlight = self |
| 482 |
.active_local_definition_captures |
| 483 |
.as_ref() |
| 484 |
.expect("must have an active config to emit matches") |
| 485 |
.get(&definition.capture) |
| 486 |
.copied(); |
| 487 |
|
| 488 |
|
| 489 |
if let Some(h) = highlight { |
| 490 |
*local_ref_candidate = Some((range.end, h)); |
| 491 |
} |
| 492 |
return; |
| 493 |
} else { |
| 494 |
self.active_highlight_indices |
| 495 |
.as_deref() |
| 496 |
.expect("must have an active config to emit matches")[node.capture.idx()] |
| 497 |
}; |
| 498 |
|
| 499 |
let highlight = highlight.map(|highlight| HighlightedNode { |
| 500 |
end: range.end, |
| 501 |
highlight, |
| 502 |
}); |
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
if !*first_highlight { |
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
let search_start = prev_stack_size.min(self.active_highlights.len()); |
| 512 |
let insert_position = self.active_highlights[search_start..] |
| 513 |
.iter() |
| 514 |
.rposition(|h| h.end <= range.end) |
| 515 |
.map(|rel_idx| rel_idx + search_start); |
| 516 |
if let Some(idx) = insert_position { |
| 517 |
match self.active_highlights[idx].end.cmp(&range.end) { |
| 518 |
|
| 519 |
cmp::Ordering::Equal => { |
| 520 |
if let Some(highlight) = highlight { |
| 521 |
self.active_highlights[idx] = highlight; |
| 522 |
} else { |
| 523 |
self.active_highlights.remove(idx); |
| 524 |
} |
| 525 |
} |
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
cmp::Ordering::Less => { |
| 530 |
if let Some(highlight) = highlight { |
| 531 |
self.active_highlights.insert(idx, highlight) |
| 532 |
} |
| 533 |
} |
| 534 |
|
| 535 |
cmp::Ordering::Greater => unreachable!(), |
| 536 |
} |
| 537 |
} else { |
| 538 |
self.active_highlights.extend(highlight); |
| 539 |
} |
| 540 |
} else if let Some(highlight) = highlight { |
| 541 |
self.active_highlights.push(highlight); |
| 542 |
*first_highlight = false; |
| 543 |
} |
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
debug_assert!( |
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
self.current_layer_highlights().is_sorted_by_key(|h| cmp::Reverse(h.end)), |
| 555 |
"unsorted highlights on layer {:?}: {:?}\nall active highlights must be sorted by `end` descending", |
| 556 |
self.current_layer, |
| 557 |
self.active_highlights, |
| 558 |
); |
| 559 |
} |
| 560 |
} |
| 561 |
|
| 562 |
pub(crate) struct HighlightQueryLoader<T>(T); |
| 563 |
|
| 564 |
impl<'a, T: LanguageLoader> QueryLoader<'a> for HighlightQueryLoader<&'a T> { |
| 565 |
fn get_query(&mut self, lang: Language) -> Option<&'a Query> { |
| 566 |
self.0 |
| 567 |
.get_config(lang) |
| 568 |
.map(|config| &config.highlight_query.query) |
| 569 |
} |
| 570 |
|
| 571 |
fn are_predicates_satisfied( |
| 572 |
&self, |
| 573 |
lang: Language, |
| 574 |
mat: &QueryMatch<'_, '_>, |
| 575 |
source: RopeSlice<'_>, |
| 576 |
locals_cursor: &ScopeCursor<'_>, |
| 577 |
) -> bool { |
| 578 |
let highlight_query = &self |
| 579 |
.0 |
| 580 |
.get_config(lang) |
| 581 |
.expect("must have a config to emit matches") |
| 582 |
.highlight_query; |
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
|
| 592 |
if highlight_query.local_reference_capture.is_some() |
| 593 |
&& highlight_query.non_local_patterns.contains(&mat.pattern()) |
| 594 |
{ |
| 595 |
let has_local_reference = mat.matched_nodes().any(|n| { |
| 596 |
let range = n.node.byte_range(); |
| 597 |
let text: Cow<str> = source |
| 598 |
.byte_slice(range.start as usize..range.end as usize) |
| 599 |
.into(); |
| 600 |
locals_cursor |
| 601 |
.locals |
| 602 |
.lookup_reference(locals_cursor.current_scope(), &text) |
| 603 |
.is_some_and(|def| range.start >= def.range.start) |
| 604 |
}); |
| 605 |
if has_local_reference { |
| 606 |
return false; |
| 607 |
} |
| 608 |
} |
| 609 |
|
| 610 |
true |
| 611 |
} |
| 612 |
} |