MCPcopy Create free account

hub / github.com/boxbeam/untwine / functions

Functions133 in github.com/boxbeam/untwine

↓ 31 callersMethodcursor
Get the current index of the parsing head.
src/context.rs:163
↓ 27 callersMethodmap
Convert the inner data using a mapping function
src/lib.rs:75
↓ 23 callersMethodlen
(&self)
src/parser.rs:28
↓ 17 callersMethodparse
(&self, ctx: &'p ParserContext<'p, C, E>)
src/parser.rs:329
↓ 17 callersFunctionparser
Create a Parser from a lambda which takes in a &[`ParserContext`] and returns a [`ParserResult`].
src/parser.rs:285
↓ 14 callersMethodto_string
(&self)
macros/src/display.rs:5
↓ 11 callersFunctionparse
Parse a value with a parser function created by the [parser!] block.
src/lib.rs:84
↓ 9 callersMethodslice
Get the portion of the input which has not yet been consumed.
src/context.rs:62
↓ 8 callersMethodreset
Reset the parsing head to a specific byte index.
src/context.rs:158
↓ 5 callersMethodadvance
Advance the parsing head by the given number of bytes.
src/context.rs:153
↓ 5 callersFunctiongenerate_pattern_parser
( pattern: &Pattern, state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:140
↓ 5 callersFunctionis_unit
(typ: &Type)
macros/src/codegen/mod.rs:40
↓ 5 callersMethodset_err_priority
Set the priority to be used for new errors. Intended for internal use.
src/context.rs:178
↓ 4 callersFunctioncol
Get the column index of the last line in a string.
src/context.rs:312
↓ 4 callersMethoddeepest_err_pos
Get the position of the deepest error encountered while parsing so far.
src/context.rs:224
↓ 4 callersFunctionget_patterns_lookahead
( patterns: impl ExactSizeIterator<Item = &'a Pattern>, )
macros/src/codegen/lookahead_optimization.rs:220
↓ 4 callersFunctionline
Get the line count of a string.
src/context.rs:307
↓ 4 callersFunctionparser_repl
Launches a (very) simple REPL where you can enter individual lines and see the parser output, useful for testing. Multiline inputs are not supported,
src/lib.rs:115
↓ 3 callersMethoderr
(&self, error: E)
src/context.rs:190
↓ 3 callersMethoderr_range
Get the span of the deepest error encountered while parsing so far.
src/context.rs:229
↓ 3 callersFunctiongenerate_fragment_parser
( fragment: &PatternFragment, state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:56
↓ 3 callersFunctiongenerate_pattern_choice_parser
( patterns: &[Vec<Pattern>], state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:209
↓ 3 callersFunctiongenerate_pattern_sequence_parser
( patterns: &[Pattern], state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:305
↓ 3 callersFunctionlist
( input: ParseStream, require: bool, terminator: fn(ParseStream) -> bool, )
macros/src/lib.rs:633
↓ 3 callersMethodmap
Map the output value using a mapping function.
src/parser.rs:48
↓ 3 callersMethodparse
(input: ParseStream)
macros/src/lib.rs:49
↓ 3 callersFunctionpattern_type
(pattern: &Pattern, parser_types: &HashMap<String, Type>)
macros/src/codegen/mod.rs:569
↓ 2 callersMethodappend
(&self, item: T)
src/parser.rs:18
↓ 2 callersFunctionbuild_recovered_value
(data: &Fields)
macros/src/recoverable.rs:68
↓ 2 callersFunctionfragment_type
(fragment: &PatternFragment, parser_types: &HashMap<String, Type>)
macros/src/codegen/mod.rs:531
↓ 2 callersFunctiongenerate_lookahead_optional
( fragment: &PatternFragment, parser: TokenStream, state: &CodegenState, )
macros/src/codegen/lookahead_optimization.rs:85
↓ 2 callersFunctiongenerate_pattern_list_parser
( patterns: &PatternList, state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:192
↓ 2 callersFunctiongeneric_bounds
(generics: &Generics)
macros/src/recoverable.rs:50
↓ 2 callersMethodget_err_priority
Get the priority to be used for new errors. Intended for internal use.
src/context.rs:183
↓ 2 callersFunctionget_error_line
(lines: &'a [&'a str], line: usize, col: usize)
src/pretty.rs:147
↓ 2 callersFunctionget_fragment_lookahead
(fragment: &PatternFragment)
macros/src/codegen/lookahead_optimization.rs:172
↓ 2 callersFunctionget_pattern_list_lookahead
(list: &PatternList)
macros/src/codegen/lookahead_optimization.rs:207
↓ 2 callersFunctionget_pattern_lookahead
(pattern: &Pattern)
macros/src/codegen/lookahead_optimization.rs:160
↓ 2 callersFunctionlines
Get the lines of a string, including a trailing blank line
src/context.rs:301
↓ 2 callersFunctionlist_type
(patterns: &[Pattern], parser_types: &HashMap<String, Type>)
macros/src/codegen/mod.rs:552
↓ 2 callersFunctionparse_return_type
(input: &ParseStream)
macros/src/lib.rs:289
↓ 2 callersMethodrecover_err
Move the primary error into the recovered errors list.
src/context.rs:248
↓ 2 callersFunctionresolve_lookaheads
( lookaheads: &[NextChar], parser_lookaheads: &HashMap<String, Vec<NextChar>>, )
macros/src/codegen/lookahead_optimization.rs:112
↓ 2 callersMethodresult
Convert the outcome of the parsing operation into a `Result`. If any errors were recovered, or if the entire input was not consumed, parsing will be c
src/context.rs:88
↓ 2 callersMethodtake_errs
Take all the errors (primary error and recovered errors) in the context.
src/context.rs:133
↓ 2 callersMethodtake_recovered_errors
Take the errors which were recovered from while parsing.
src/context.rs:264
↓ 1 callersMethodadd_recovered_err
Add an error to the recovered errors list.
src/context.rs:259
↓ 1 callersFunctionbuild_lookahead_map
( parsers: &ParserBlock<ParserFunction>, )
macros/src/codegen/lookahead_optimization.rs:145
↓ 1 callersFunctioncontains
(end_bound: Bound<&usize>, elem: usize)
src/attr.rs:180
↓ 1 callersMethoddeepest_recovered_err_pos
Get the ending position of the last recovered error, falling back to the current position if no errors have been recovered.
src/context.rs:282
↓ 1 callersFunctiongenerate_lookahead_table
( choices: &[Vec<Pattern>], state: &CodegenState, capture: bool, )
macros/src/codegen/lookahead_optimization.rs:20
↓ 1 callersFunctiongenerate_parser_block
(block: ParserBlock<ParserDef>)
macros/src/codegen/mod.rs:433
↓ 1 callersFunctiongenerate_parser_function
(parser: &ParserFunction, state: &CodegenState)
macros/src/codegen/mod.rs:363
↓ 1 callersFunctionget_wrapped_parsers
(parsers: &[ParserFunction])
macros/src/codegen/mod.rs:500
↓ 1 callersMethodinspect_last
(&self, f: impl FnOnce(&T) -> V)
src/parser.rs:36
↓ 1 callersMethodinto_functions
(self)
macros/src/lib.rs:115
↓ 1 callersMethodinto_inner
(self)
src/parser.rs:22
↓ 1 callersMethodinto_range
(self)
src/attr.rs:158
↓ 1 callersFunctionliteral
( literal: &'static str, parser_name: &'static str, )
src/parsers.rs:5
↓ 1 callersMethodlock_errors
(&self)
src/context.rs:76
↓ 1 callersFunctionnumbered_ident
(num: usize)
macros/src/codegen/mod.rs:527
↓ 1 callersFunctionoption_of
(typ: &Type)
macros/src/codegen/mod.rs:20
↓ 1 callersFunctionoptional
(input: ParseStream)
macros/src/lib.rs:645
↓ 1 callersFunctionparse_pretty
Parse a value with a parser function created by the [parser!] block, and convert the error to a pretty string if there is one.
src/lib.rs:99
↓ 1 callersFunctionpretty_error
( input: &str, span: Range<usize>, error: String, colors: &PrettyOptions, )
src/pretty.rs:58
↓ 1 callersMethodpretty_result
Convert the output of the parsing operation into a `Result` with prettified error messages. If any errors were recovered, or if the entire input was n
src/context.rs:114
↓ 1 callersFunctionrecover_enum
( data: &DataEnum, name: &Ident, generics: &Generics, )
macros/src/recoverable.rs:5
↓ 1 callersFunctionrecover_struct
(data: &DataStruct, name: &Ident, generics: &Generics)
macros/src/recoverable.rs:37
↓ 1 callersMethodrecovered_count
Get the number of errors which have been recovered from this parser. This is meant for internal use only, but has to be exposed since it is used by ma
src/context.rs:270
↓ 1 callersFunctionshow_span
(input: &str, span: Range<usize>, options: &PrettyOptions)
src/pretty.rs:78
↓ 1 callersMethodspan
Capture the span of the parsed value as a [&str] instead of the value of itself.
src/parser.rs:158
↓ 1 callersMethodtake_err
Take the primary error encountered during parsing.
src/context.rs:242
↓ 1 callersMethodtruncate
(&self, len: usize)
src/parser.rs:32
↓ 1 callersFunctionvec_of
(typ: &Type)
macros/src/codegen/mod.rs:30
Functionbenchmark_json
(bench: &mut Bencher)
tests/src/benches.rs:80
Functionbenchmark_json5_nodes
(bench: &mut Bencher)
tests/src/benches.rs:85
Functionbenchmark_serde_json
(bencher: &mut Bencher)
tests/src/benches.rs:90
Functionchar_filter
( f: impl Fn(&char) -> bool + 'static, token_name: &'static str, )
src/parsers.rs:32
Methodcol
Get the column number of the parsing head.
src/context.rs:72
Functionconvert
Map the output type of the parser using a mapping function. Identical to [map], but with a different name since `map` is a common name for a parser to
src/attr.rs:139
Methoddata
Get an immutable reference to the inner custom context.
src/context.rs:168
Methoddata_mut
Get a mutable reference to the inner custom context.
src/context.rs:173
Functiondbg
Debug prints the output of the parser and returns it unchanged.
src/attr.rs:16
Methoddefault
()
src/parser.rs:10
Methoddefault
()
src/pretty.rs:42
Methoddelimited
Parse a list using this parser, separated by another delimiter parser. Discards delimiters, and requires at least one match.
src/parser.rs:113
Methodderef
(&self)
src/lib.rs:62
Methodderef_mut
(&mut self)
src/lib.rs:68
Methoddrop
(&mut self)
src/context.rs:295
Methoderror_value
(pos: Range<usize>)
src/recoverable.rs:32
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/error.rs:20
Methodfrom
(value: ParserError)
tests/src/lib.rs:189
Methodignore
Ignore the output of this parser by dropping it.
src/parser.rs:150
Methodline
Get the line number of the parsing head.
src/context.rs:67
Functionlist_terminator
(input: ParseStream)
macros/src/lib.rs:582
Functionmain
()
examples/indent.rs:38
Functionmain
()
examples/lisp.rs:48
Functionmain
()
examples/json.rs:74
Functionmain
()
examples/bool.rs:32
Functionmain
()
examples/expr.rs:24
next →1–100 of 133, ranked by callers