Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/boxbeam/untwine
/ functions
Functions
133 in github.com/boxbeam/untwine
⨍
Functions
133
◇
Types & classes
43
↓ 31 callers
Method
cursor
Get the current index of the parsing head.
src/context.rs:163
↓ 27 callers
Method
map
Convert the inner data using a mapping function
src/lib.rs:75
↓ 23 callers
Method
len
(&self)
src/parser.rs:28
↓ 17 callers
Method
parse
(&self, ctx: &'p ParserContext<'p, C, E>)
src/parser.rs:329
↓ 17 callers
Function
parser
Create a Parser from a lambda which takes in a &[`ParserContext`] and returns a [`ParserResult`].
src/parser.rs:285
↓ 14 callers
Method
to_string
(&self)
macros/src/display.rs:5
↓ 11 callers
Function
parse
Parse a value with a parser function created by the [parser!] block.
src/lib.rs:84
↓ 9 callers
Method
slice
Get the portion of the input which has not yet been consumed.
src/context.rs:62
↓ 8 callers
Method
reset
Reset the parsing head to a specific byte index.
src/context.rs:158
↓ 5 callers
Method
advance
Advance the parsing head by the given number of bytes.
src/context.rs:153
↓ 5 callers
Function
generate_pattern_parser
( pattern: &Pattern, state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:140
↓ 5 callers
Function
is_unit
(typ: &Type)
macros/src/codegen/mod.rs:40
↓ 5 callers
Method
set_err_priority
Set the priority to be used for new errors. Intended for internal use.
src/context.rs:178
↓ 4 callers
Function
col
Get the column index of the last line in a string.
src/context.rs:312
↓ 4 callers
Method
deepest_err_pos
Get the position of the deepest error encountered while parsing so far.
src/context.rs:224
↓ 4 callers
Function
get_patterns_lookahead
( patterns: impl ExactSizeIterator<Item = &'a Pattern>, )
macros/src/codegen/lookahead_optimization.rs:220
↓ 4 callers
Function
line
Get the line count of a string.
src/context.rs:307
↓ 4 callers
Function
parser_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 callers
Method
err
(&self, error: E)
src/context.rs:190
↓ 3 callers
Method
err_range
Get the span of the deepest error encountered while parsing so far.
src/context.rs:229
↓ 3 callers
Function
generate_fragment_parser
( fragment: &PatternFragment, state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:56
↓ 3 callers
Function
generate_pattern_choice_parser
( patterns: &[Vec<Pattern>], state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:209
↓ 3 callers
Function
generate_pattern_sequence_parser
( patterns: &[Pattern], state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:305
↓ 3 callers
Function
list
( input: ParseStream, require: bool, terminator: fn(ParseStream) -> bool, )
macros/src/lib.rs:633
↓ 3 callers
Method
map
Map the output value using a mapping function.
src/parser.rs:48
↓ 3 callers
Method
parse
(input: ParseStream)
macros/src/lib.rs:49
↓ 3 callers
Function
pattern_type
(pattern: &Pattern, parser_types: &HashMap<String, Type>)
macros/src/codegen/mod.rs:569
↓ 2 callers
Method
append
(&self, item: T)
src/parser.rs:18
↓ 2 callers
Function
build_recovered_value
(data: &Fields)
macros/src/recoverable.rs:68
↓ 2 callers
Function
fragment_type
(fragment: &PatternFragment, parser_types: &HashMap<String, Type>)
macros/src/codegen/mod.rs:531
↓ 2 callers
Function
generate_lookahead_optional
( fragment: &PatternFragment, parser: TokenStream, state: &CodegenState, )
macros/src/codegen/lookahead_optimization.rs:85
↓ 2 callers
Function
generate_pattern_list_parser
( patterns: &PatternList, state: &CodegenState, capture: bool, )
macros/src/codegen/mod.rs:192
↓ 2 callers
Function
generic_bounds
(generics: &Generics)
macros/src/recoverable.rs:50
↓ 2 callers
Method
get_err_priority
Get the priority to be used for new errors. Intended for internal use.
src/context.rs:183
↓ 2 callers
Function
get_error_line
(lines: &'a [&'a str], line: usize, col: usize)
src/pretty.rs:147
↓ 2 callers
Function
get_fragment_lookahead
(fragment: &PatternFragment)
macros/src/codegen/lookahead_optimization.rs:172
↓ 2 callers
Function
get_pattern_list_lookahead
(list: &PatternList)
macros/src/codegen/lookahead_optimization.rs:207
↓ 2 callers
Function
get_pattern_lookahead
(pattern: &Pattern)
macros/src/codegen/lookahead_optimization.rs:160
↓ 2 callers
Function
lines
Get the lines of a string, including a trailing blank line
src/context.rs:301
↓ 2 callers
Function
list_type
(patterns: &[Pattern], parser_types: &HashMap<String, Type>)
macros/src/codegen/mod.rs:552
↓ 2 callers
Function
parse_return_type
(input: &ParseStream)
macros/src/lib.rs:289
↓ 2 callers
Method
recover_err
Move the primary error into the recovered errors list.
src/context.rs:248
↓ 2 callers
Function
resolve_lookaheads
( lookaheads: &[NextChar], parser_lookaheads: &HashMap<String, Vec<NextChar>>, )
macros/src/codegen/lookahead_optimization.rs:112
↓ 2 callers
Method
result
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 callers
Method
take_errs
Take all the errors (primary error and recovered errors) in the context.
src/context.rs:133
↓ 2 callers
Method
take_recovered_errors
Take the errors which were recovered from while parsing.
src/context.rs:264
↓ 1 callers
Method
add_recovered_err
Add an error to the recovered errors list.
src/context.rs:259
↓ 1 callers
Function
build_lookahead_map
( parsers: &ParserBlock<ParserFunction>, )
macros/src/codegen/lookahead_optimization.rs:145
↓ 1 callers
Function
contains
(end_bound: Bound<&usize>, elem: usize)
src/attr.rs:180
↓ 1 callers
Method
deepest_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 callers
Function
generate_lookahead_table
( choices: &[Vec<Pattern>], state: &CodegenState, capture: bool, )
macros/src/codegen/lookahead_optimization.rs:20
↓ 1 callers
Function
generate_parser_block
(block: ParserBlock<ParserDef>)
macros/src/codegen/mod.rs:433
↓ 1 callers
Function
generate_parser_function
(parser: &ParserFunction, state: &CodegenState)
macros/src/codegen/mod.rs:363
↓ 1 callers
Function
get_wrapped_parsers
(parsers: &[ParserFunction])
macros/src/codegen/mod.rs:500
↓ 1 callers
Method
inspect_last
(&self, f: impl FnOnce(&T) -> V)
src/parser.rs:36
↓ 1 callers
Method
into_functions
(self)
macros/src/lib.rs:115
↓ 1 callers
Method
into_inner
(self)
src/parser.rs:22
↓ 1 callers
Method
into_range
(self)
src/attr.rs:158
↓ 1 callers
Function
literal
( literal: &'static str, parser_name: &'static str, )
src/parsers.rs:5
↓ 1 callers
Method
lock_errors
(&self)
src/context.rs:76
↓ 1 callers
Function
numbered_ident
(num: usize)
macros/src/codegen/mod.rs:527
↓ 1 callers
Function
option_of
(typ: &Type)
macros/src/codegen/mod.rs:20
↓ 1 callers
Function
optional
(input: ParseStream)
macros/src/lib.rs:645
↓ 1 callers
Function
parse_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 callers
Function
pretty_error
( input: &str, span: Range<usize>, error: String, colors: &PrettyOptions, )
src/pretty.rs:58
↓ 1 callers
Method
pretty_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 callers
Function
recover_enum
( data: &DataEnum, name: &Ident, generics: &Generics, )
macros/src/recoverable.rs:5
↓ 1 callers
Function
recover_struct
(data: &DataStruct, name: &Ident, generics: &Generics)
macros/src/recoverable.rs:37
↓ 1 callers
Method
recovered_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 callers
Function
show_span
(input: &str, span: Range<usize>, options: &PrettyOptions)
src/pretty.rs:78
↓ 1 callers
Method
span
Capture the span of the parsed value as a [&str] instead of the value of itself.
src/parser.rs:158
↓ 1 callers
Method
take_err
Take the primary error encountered during parsing.
src/context.rs:242
↓ 1 callers
Method
truncate
(&self, len: usize)
src/parser.rs:32
↓ 1 callers
Function
vec_of
(typ: &Type)
macros/src/codegen/mod.rs:30
Function
benchmark_json
(bench: &mut Bencher)
tests/src/benches.rs:80
Function
benchmark_json5_nodes
(bench: &mut Bencher)
tests/src/benches.rs:85
Function
benchmark_serde_json
(bencher: &mut Bencher)
tests/src/benches.rs:90
Function
char_filter
( f: impl Fn(&char) -> bool + 'static, token_name: &'static str, )
src/parsers.rs:32
Method
col
Get the column number of the parsing head.
src/context.rs:72
Function
convert
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
Method
data
Get an immutable reference to the inner custom context.
src/context.rs:168
Method
data_mut
Get a mutable reference to the inner custom context.
src/context.rs:173
Function
dbg
Debug prints the output of the parser and returns it unchanged.
src/attr.rs:16
Method
default
()
src/parser.rs:10
Method
default
()
src/pretty.rs:42
Method
delimited
Parse a list using this parser, separated by another delimiter parser. Discards delimiters, and requires at least one match.
src/parser.rs:113
Method
deref
(&self)
src/lib.rs:62
Method
deref_mut
(&mut self)
src/lib.rs:68
Method
drop
(&mut self)
src/context.rs:295
Method
error_value
(pos: Range<usize>)
src/recoverable.rs:32
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/error.rs:20
Method
from
(value: ParserError)
tests/src/lib.rs:189
Method
ignore
Ignore the output of this parser by dropping it.
src/parser.rs:150
Method
line
Get the line number of the parsing head.
src/context.rs:67
Function
list_terminator
(input: ParseStream)
macros/src/lib.rs:582
Function
main
()
examples/indent.rs:38
Function
main
()
examples/lisp.rs:48
Function
main
()
examples/json.rs:74
Function
main
()
examples/bool.rs:32
Function
main
()
examples/expr.rs:24
next →
1–100 of 133, ranked by callers