MCPcopy Create free account
hub / github.com/LaBatata101/sith-language-server / new

Method new

crates/sith_python_parser/src/token_source.rs:22–28  ·  view source on GitHub ↗

Create a new token source for the given lexer.

(lexer: Lexer<'src>)

Source from the content-addressed store, hash-verified

20impl<'src> TokenSource<'src> {
21 /// Create a new token source for the given lexer.
22 pub(crate) fn new(lexer: Lexer<'src>) -> Self {
23 // TODO(dhruvmanila): Use `allocate_tokens_vec`
24 TokenSource {
25 lexer,
26 tokens: vec![],
27 }
28 }
29
30 /// Create a new token source from the given source code which starts at the given offset.
31 pub(crate) fn from_source(source: &'src str, mode: Mode, start_offset: TextSize) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected