MCPcopy Index your code

hub / github.com/maciejhirsz/logos / functions

Functions367 in github.com/maciejhirsz/logos

↓ 79 callersFunctionassert_lex
( source: &'a Token::Source, tokens: &[( Result<Token, Token::Error>, <Token::Source a
tests/src/lib.rs:8
↓ 71 callersMethoderr
(&mut self, message: M, span: Span)
logos-codegen/src/parser/mod.rs:421
↓ 47 callersMethodspan
(&self)
logos-codegen/src/parser/error_type.rs:67
↓ 23 callersMethodlen
(&self)
src/source.rs:101
↓ 21 callersMethodnext
(&mut self)
src/lexer.rs:223
↓ 21 callersMethodspan
(&self)
src/lexer.rs:134
↓ 19 callersMethodclone
(&self)
src/lexer.rs:208
↓ 15 callersMethodnext
(&mut self)
tests/tests/lexer_modes.rs:79
↓ 15 callersMethodspan
(&self)
logos-codegen/src/leaf.rs:34
↓ 14 callersMethoderr
(&mut self, message: M, span: Span)
logos-codegen/src/error.rs:12
↓ 13 callersMethodend
(&mut self, offset: usize)
src/lexer.rs:316
↓ 13 callersMethoditer_states
Iterate over all of the states of the graph
logos-codegen/src/graph/mod.rs:362
↓ 12 callersMethodspan
(&self)
logos-codegen/src/parser/definition.rs:155
↓ 10 callersMethodreplace
(&mut self, stream: TokenStream)
logos-codegen/src/util.rs:15
↓ 9 callersMethodget_state
Get a reference to the [StateData] corresponding to a state
logos-codegen/src/graph/mod.rs:367
↓ 9 callersMethodnext
(&mut self)
logos-codegen/src/parser/nested.rs:125
↓ 8 callersMethodlen
(&self)
tests/tests/source.rs:17
↓ 8 callersMethodmorph
Turn this lexer into a lexer for a new token type. The new lexer continues to point at the same span as the current lexer, and the current token beco
src/lexer.rs:174
↓ 7 callersMethodclone
(&self)
tests/tests/clone.rs:15
↓ 7 callersMethodcollect_tail
(&mut self, first: T)
logos-codegen/src/parser/nested.rs:66
↓ 7 callersMethodparse
(input: syn::parse::ParseStream)
logos-codegen/src/parser/definition.rs:164
↓ 7 callersMethodslice
(&self, range: Range<usize>)
tests/tests/source.rs:38
↓ 6 callersMethodderef
(&self)
src/lexer.rs:267
↓ 6 callersMethodfind
(&self, path: &Path)
logos-codegen/src/parser/type_params.rs:61
↓ 6 callersMethodleaves
Get a reference to the leaves used to generate this graph
logos-codegen/src/graph/mod.rs:372
↓ 6 callersFunctiontraverse_type
(ty: &mut Type, f: &mut impl FnMut(&mut Type))
logos-codegen/src/parser/type_params.rs:141
↓ 5 callersMethodpriority
(self, priority: usize)
logos-codegen/src/leaf.rs:83
↓ 5 callersMethodremainder
(&self)
src/lexer.rs:158
↓ 5 callersMethodslice
(&self)
src/lexer.rs:140
↓ 5 callersMethodtake
(&mut self)
logos-codegen/src/util.rs:19
↓ 5 callersFunctiontest_variable_definition
ANCHOR: main */
examples/string-interpolation.rs:109
↓ 5 callersMethodto_ident
(&self)
logos-codegen/src/util.rs:61
↓ 5 callersMethodtoken
(&self)
logos-codegen/src/parser/definition.rs:53
↓ 5 callersMethodunicode
(&self)
logos-codegen/src/parser/definition.rs:60
↓ 4 callersMethodbump
Bumps the end of currently lexed token by `n` bytes. # Panics Panics if adding `n` to current offset would place the `Lexer` beyond the last byte, o
src/lexer.rs:193
↓ 4 callersMethodescape
Escape this literal into a regex_syntax compatible pattern string. - `literal`: if true, escape any metacharacters the pattern so that it matches lite
logos-codegen/src/parser/definition.rs:27
↓ 4 callersFunctionexpect_punct
If supplied `tt` is a punct matching a char, returns `None`, else returns `tt`
logos-codegen/src/util.rs:52
↓ 4 callersFunctionexport_graphs
(patterns: Vec<&str>)
logos-codegen/src/graph/export.rs:289
↓ 4 callersFunctiongen_to_file
(format: bool)
logos-cli/tests/tests.rs:9
↓ 4 callersMethodget_ident
(&self, state: State)
logos-codegen/src/generator/mod.rs:150
↓ 4 callersMethodhir
Get a reference to a pattern's Hir
logos-codegen/src/pattern.rs:127
↓ 4 callersMethodparse_callback
(&mut self, tokens: TokenStream)
logos-codegen/src/parser/mod.rs:352
↓ 4 callersMethodset
(&mut self, param: Ident, ty: TokenStream, errors: &mut Errors)
logos-codegen/src/parser/type_params.rs:29
↓ 3 callersMethodadd
(&mut self, param: Ident)
logos-codegen/src/parser/type_params.rs:25
↓ 3 callersMethodcallback
(self, callback: Option<Callback>)
logos-codegen/src/leaf.rs:79
↓ 3 callersFunctiongenerate
Generate a `Logos` implementation for the given struct, provided as a stream of rust tokens.
logos-codegen/src/lib.rs:52
↓ 3 callersFunctionis_punct
(tt: &TokenTree, expect: char)
logos-codegen/src/util.rs:47
↓ 3 callersMethodnext_tt
(&mut self)
logos-codegen/src/parser/nested.rs:62
↓ 3 callersMethodroot
Get the root (initial) state of the graph
logos-codegen/src/graph/mod.rs:357
↓ 3 callersMethodslice
(&self, range: Range<usize>)
src/source.rs:123
↓ 3 callersMethodstate_transition
Generates the code to transition to a state.
logos-codegen/src/generator/mod.rs:231
↓ 3 callersMethodstate_value
Generates the code to quote a state's representation
logos-codegen/src/generator/mod.rs:244
↓ 3 callersFunctionstrip_attrs_from_vec
(attrs: &mut Vec<syn::Attribute>)
logos-codegen/src/lib.rs:475
↓ 3 callersMethodsubst_subpatterns
Given a new regex string, substitute existing subpatterns into the string. i.e. turn (?&my_subpattern) into the actual regex for "my_subpattern" Retur
logos-codegen/src/parser/subpattern.rs:112
↓ 3 callersMethodto_table
(&self)
logos-codegen/src/graph/mod.rs:218
↓ 2 callersMethodadd_byte
Add the `byte` to the set of bytes that are included in this class
logos-codegen/src/graph/mod.rs:208
↓ 2 callersMethodadd_test_to_lut
Return the identifier and bit mask used to reference a LUT containing a bit mask. The bit mask is generated to match the given edge.
logos-codegen/src/generator/mod.rs:322
↓ 2 callersFunctionbyte_to_tokens
Converts a byte to a byte literal that can be used to match it
logos-codegen/src/generator/mod.rs:371
↓ 2 callersMethodearly_or_accept
Collapse the `early` and `accept` fields into a single field, if either is set. (Priority is given to `early`.)
logos-codegen/src/graph/mod.rs:57
↓ 2 callersMethodfork_eoi
Generate code for encountering the end of input. If we are not in the middle of a token, return None (the iterator is ended) If the state has an EOI n
logos-codegen/src/generator/fork.rs:31
↓ 2 callersFunctionget_string_content
ANCHOR: variable_definition */
examples/string-interpolation.rs:48
↓ 2 callersFunctiongreedy_dotall_check
(definition: &Definition, pattern: &Pattern, parser: &mut Parser)
logos-codegen/src/lib.rs:421
↓ 2 callersMethoditer_children
An iterator over all [State] objects directly reachable from this state
logos-codegen/src/graph/mod.rs:110
↓ 2 callersMethodnamed_attr
(&mut self, name: Ident, value: NestedValue, parser: &mut Parser)
logos-codegen/src/parser/error_type.rs:28
↓ 2 callersMethodparse_attr
(&mut self, attr: &mut Attribute)
logos-codegen/src/parser/mod.rs:58
↓ 2 callersMethodparse_definition
(&mut self, mut nested: AttributeParser)
logos-codegen/src/parser/mod.rs:313
↓ 2 callersMethodparse_definition_attr
Parse attribute definition of a token: + `#[token(literal[, callback])]` + `#[regex(literal[, callback])]`
logos-codegen/src/parser/mod.rs:307
↓ 2 callersMethodparse_literal
(&mut self, lit: Lit)
logos-codegen/src/parser/mod.rs:291
↓ 2 callersFunctionparse_object
ANCHOR: object */ Parse a token stream into an object and return when a valid terminator is found. > NOTE: we assume '{' was consumed.
examples/json_borrowed.rs:164
↓ 2 callersFunctionparse_object
ANCHOR: object */ Parse a token stream into an object and return when a valid terminator is found. > NOTE: we assume '{' was consumed.
examples/json.rs:168
↓ 2 callersFunctionparse_value
ANCHOR: value */ Parse a token stream into a JSON value.
examples/json_borrowed.rs:85
↓ 2 callersFunctionparse_value
ANCHOR: value */ Parse a token stream into a JSON value.
examples/json.rs:89
↓ 2 callersMethodrender
(self)
logos-codegen/src/error.rs:24
↓ 2 callersMethodretain_states
Retains only the states in `states` if `keep` is true, otherwise removes them.
logos-codegen/src/graph/mod.rs:651
↓ 2 callersMethodrewrite_states
Rewrites all edges in the graph. Any edge that went to a key state in `rewrites` is changed to point to the corresponding value state in `rewrites`.
logos-codegen/src/graph/mod.rs:671
↓ 2 callersMethodset_normal_edges
Using this function to initialize the edges from a hashmap will sort the resulting vec by state number for generated code stability
logos-codegen/src/graph/mod.rs:127
↓ 2 callersMethodslice_unchecked
(&self, range: Range<usize>)
src/source.rs:129
↓ 2 callersMethodspanned
(self)
src/lexer.rs:121
↓ 2 callersMethodstate_action
Generates the code to transition to a state stored in an identifier
logos-codegen/src/generator/mod.rs:236
↓ 2 callersMethodto_token_stream
(&self)
logos-codegen/src/util.rs:32
↓ 2 callersFunctiontraverse_path
(path: &mut Path, f: &mut impl FnMut(&mut Type))
logos-codegen/src/parser/type_params.rs:172
↓ 2 callersMethodvariant_kind
(self, kind: VariantKind)
logos-codegen/src/leaf.rs:75
↓ 1 callersMethodadd_back_edge
Add a backreference to the given state, which specifies that `self` is reachable from `state`.
logos-codegen/src/graph/mod.rs:119
↓ 1 callersMethodcan_error
Determine if there is a byte that doesn't have a next state (is an error) for this state.
logos-codegen/src/graph/mod.rs:133
↓ 1 callersMethodcheck_for_greedy_all
Return true if this pattern contains a non-greedy `.+` or `.*`
logos-codegen/src/pattern.rs:103
↓ 1 callersFunctioncodegen
(input: String)
logos-cli/src/main.rs:65
↓ 1 callersFunctioncount_ok
(s: &str)
tests/benches/bench.rs:131
↓ 1 callersMethodcount_ops
(&self)
logos-codegen/src/graph/mod.rs:314
↓ 1 callersFunctioneq_ignore_newlines
(lhs: &str, rhs: &str)
logos-cli/src/main.rs:96
↓ 1 callersMethoderrors
Iterate over all the disambiguation errors encountered while generating this graph
logos-codegen/src/graph/mod.rs:382
↓ 1 callersFunctionexecute
Execute Brainfuck code from a string slice.
examples/brainfuck.rs:90
↓ 1 callersMethodexplicit_lifetime
(&mut self, lt: LifetimeParam, errors: &mut Errors)
logos-codegen/src/parser/type_params.rs:15
↓ 1 callersFunctionfast_loop_macro
This macro is included with the generated code. It is used to manually unroll the fast_loop loop.
logos-codegen/src/generator/fast_loop.rs:53
↓ 1 callersMethodfind_boundary
(&self, mut index: usize)
src/source.rs:141
↓ 1 callersFunctionfind_close_bracket
Find the next occurence of ]=] in the string, where level specifies the number of `=` in the needle
tests/tests/old_logos_bugs.rs:245
↓ 1 callersMethodgenerate
Generates the implementation (body) of the [Logos::lex] function
logos-codegen/src/generator/mod.rs:84
↓ 1 callersMethodgenerate_callback
This function generates the code responsible for calling user callbacks and returning an enum variant to the caller of [Logos::lex]. Its return value
logos-codegen/src/generator/leaf.rs:12
↓ 1 callersFunctiongenerate_graphs
(path_str: &str, name: &str, graph: &Graph)
logos-codegen/src/lib.rs:485
↓ 1 callersMethodgenerate_state
Generates the body of a state. This is a match statement over the next byte, which determines the next state. It also instantiates the relevant leaf,
logos-codegen/src/generator/mod.rs:260
↓ 1 callersMethodgenerics
(&mut self)
logos-codegen/src/parser/mod.rs:54
next →1–100 of 367, ranked by callers