[−][src]Trait silkworm_syn::parse::Parse
Trait for AST types that can be parsed.
Required methods
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
Parse an AST node with a shared parsing context. Errors are emitted into ctx
.
This emits an error if partial
is false
and the input is not completely consumed.
Provided methods
fn parse_with_ctx<I: IntoIterator<Item = Token>>(
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
Parse an AST node with a shared parsing context. Errors are emitted into ctx
.
This emits an error if the input is not completely consumed.
fn partial_parse_with_interner(
partial: bool,
source: &str,
span_base: u32,
interner: &mut Interner
) -> Result<Self, Vec<Error>>
partial: bool,
source: &str,
span_base: u32,
interner: &mut Interner
) -> Result<Self, Vec<Error>>
Convenience method for parsing source without a shared context. Errors are returned
in the Err
variant.
This emits an error if partial
is false
and the input is not completely consumed.
Errors
If any errors are emitted by the parser.
fn parse_with_interner(
source: &str,
span_base: u32,
interner: &mut Interner
) -> Result<Self, Vec<Error>>
source: &str,
span_base: u32,
interner: &mut Interner
) -> Result<Self, Vec<Error>>
Convenience method for parsing source without a shared context. Errors are returned
in the Err
variant.
This emits an error if the input is not completely consumed.
Errors
If any errors are emitted by the parser.
fn partial_parse(
partial: bool,
source: &str,
span_base: u32
) -> Result<(Self, Interner), Vec<Error>>
partial: bool,
source: &str,
span_base: u32
) -> Result<(Self, Interner), Vec<Error>>
Convenience method for parsing source without a shared context. Errors are returned
in the Err
variant.
Symbols will be interned using a new interner, which will be returned on success.
This emits an error if partial
is false
and the input is not completely consumed.
Errors
If any errors are emitted by the parser.
fn parse(source: &str, span_base: u32) -> Result<(Self, Interner), Vec<Error>>
Convenience method for parsing source without a shared context. Errors are returned
in the Err
variant.
Symbols will be interned using a new interner, which will be returned on success.
This emits an error if the input is not completely consumed.
Errors
If any errors are emitted by the parser.
Implementors
impl Parse for FlowTarget
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for FormatFuncArgKey
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for NodeHeader
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for StrSegment
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Command
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Expr
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for File
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Flow
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for FormatFunc
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for FormatFuncArg
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Hashtag
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Lit
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Meta
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Node
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Path
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Pragma
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for ShortcutOption
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Stmt
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for StmtBody
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for StrBody
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Text
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
impl Parse for Var
[src]
const SOURCE_BLOCK_MODE: BlockMode
[src]
const SOURCE_INLINE_MODE: InlineMode
[src]
fn partial_parse_with_ctx<I: IntoIterator<Item = Token>>(
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>
[src]
partial: bool,
ctx: ParseCtx,
token_stream: I
) -> Result<Self, ()>