1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Per-language metric and AST modules deliberately consume the macro-
// generated tree-sitter token enums via `use crate::*` and `use Foo::*`
// inside match expressions — explicit imports would list dozens of
// variants per arm and obscure the per-language token sets that are the
// point of these files. Allowed at the module level rather than per
// function so the per-language impl blocks stay readable.
//! [`ParserTrait`], [`LanguageInfo`], and [`Search`].
use Path;
use Arc;
use crateAlterator;
use crateChecker;
use crateGetter;
use crate*;
use crateAncestors;
use crateNode;
use crateFilter;
use cratePreprocResults;
/// Static identification of a language code tag.
///
/// Implemented by every `XxxCode` type generated by the internal
/// `mk_code!` macro. Crate-internal: reached only through the
/// `pub` `Parser<T>` plumbing behind the `big_code_analysis::Ast` seam.
/// A parsed source in one language: the tree, its bytes, and the
/// `Checker` / `Getter` classifiers that read it.
///
/// Implemented once, generically, by [`Parser<T>`](crate::parser::Parser)
/// for every `*Code` tag; the per-language `*Parser` aliases in
/// [`langs`](crate::langs) are its concrete forms. This is the *parse*
/// half of a language: `big-code-analysis` layers the per-metric
/// implementations on top through its own supertrait, so nothing here
/// depends on a metric (#1376). Not an extension contract — implement
/// nothing; match on [`AnyParser`] to reach one.
/// Subtree traversal helpers implemented by [`Node`].