[−][src]Trait rune::Parse
The parse trait, implemented by items that can be parsed.
Required methods
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
Parse the current item from the parser.
Implementations on Foreign Types
impl<A, B> Parse for (A, B) where
A: Parse + Peek,
B: Parse,
[src]
A: Parse + Peek,
B: Parse,
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl<T> Parse for Option<T> where
T: Parse + Peek,
[src]
T: Parse + Peek,
Parse implementation for something that can be optionally parsed.
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl<T> Parse for Box<T> where
T: Parse,
[src]
T: Parse,
Parse implementation for something that is boxed.
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl<T> Parse for Vec<T> where
T: Parse + Peek,
[src]
T: Parse + Peek,
Parser implementation for a vector.
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
Implementors
impl Parse for Condition
[src]
Parse a condition.
Examples
use rune::{parse_all, ast}; parse_all::<ast::Condition>("true")?; parse_all::<ast::Condition>("let [a, ..] = v")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Decl
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DeclStructBody
[src]
Parse implementation for a struct body.
Examples
use rune::{parse_all, ast}; parse_all::<ast::DeclStructBody>("").unwrap(); parse_all::<ast::DeclStructBody>("( a, b, c )").unwrap(); parse_all::<ast::DeclStructBody>("{ a, b, c }").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DeclUseComponent
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Expr
[src]
Parsing a block expression.
Examples
use rune::{parse_all, ast}; parse_all::<ast::Expr>("foo[\"foo\"]").unwrap(); parse_all::<ast::Expr>("foo.bar()").unwrap(); parse_all::<ast::Expr>("var()").unwrap(); parse_all::<ast::Expr>("var").unwrap(); parse_all::<ast::Expr>("42").unwrap(); parse_all::<ast::Expr>("1 + 2 / 3 - 4 * 1").unwrap(); parse_all::<ast::Expr>("foo[\"bar\"]").unwrap(); parse_all::<ast::Expr>("let var = 42").unwrap(); parse_all::<ast::Expr>("let var = \"foo bar\"").unwrap(); parse_all::<ast::Expr>("var[\"foo\"] = \"bar\"").unwrap(); parse_all::<ast::Expr>("let var = objects[\"foo\"] + 1").unwrap(); parse_all::<ast::Expr>("var = 42").unwrap(); let expr = parse_all::<ast::Expr>(r#" if 1 { } else { if 2 { } else { } } "#).unwrap(); if let ast::Expr::ExprIf(..) = expr.item { } else { panic!("not an if statement"); } // Chained function calls. parse_all::<ast::Expr>("foo.bar.baz()").unwrap(); parse_all::<ast::Expr>("foo[0][1][2]").unwrap(); parse_all::<ast::Expr>("foo.bar()[0].baz()[1]").unwrap(); parse_all::<ast::Expr>("42 is int::int").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprBreakValue
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for FnArg
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitObjectIdent
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitObjectKey
[src]
Parse an object literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitObjectKey>("foo")?; parse_all::<ast::LitObjectKey>("\"foo \\n bar\"")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Pat
[src]
Parsing a block expression.
Examples
use rune::{parse_all, ast}; parse_all::<ast::Pat>("()").unwrap(); parse_all::<ast::Pat>("1").unwrap(); parse_all::<ast::Pat>("'a'").unwrap(); parse_all::<ast::Pat>("\"hello world\"").unwrap(); parse_all::<ast::Pat>("var").unwrap(); parse_all::<ast::Pat>("_").unwrap(); parse_all::<ast::Pat>("Foo(n)").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for And
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Async
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Await
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Break
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for CloseBrace
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for CloseBracket
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for CloseParen
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Colon
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Comma
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DeclEnum
[src]
Parse implementation for an enum.
Examples
use rune::{parse_all, ast}; parse_all::<ast::DeclEnum>("enum Foo { Bar(a), Baz(b), Empty() }").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DeclFile
[src]
Parse a file.
Examples
use rune::{parse_all, ast}; parse_all::<ast::DeclFile>(r#" use foo; fn foo() { 42 } use bar; fn bar(a, b) { a } "#).unwrap();
Realistic Example
use rune::{parse_all, ast}; parse_all::<ast::DeclFile>(r#" use http; fn main() { let client = http::client(); let response = client.get("https://google.com"); let text = response.text(); } "#).unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DeclFn
[src]
Parse implementation for a function.
Examples
use rune::{ParseAll, parse_all, ast, Resolve as _}; parse_all::<ast::DeclFn>("async fn hello() {}").unwrap(); assert!(parse_all::<ast::DeclFn>("fn async hello() {}").is_err()); let ParseAll { item, .. } = parse_all::<ast::DeclFn>("fn hello() {}").unwrap(); assert_eq!(item.args.items.len(), 0); let ParseAll { source, item } = parse_all::<ast::DeclFn>("fn hello(foo, bar) {}").unwrap(); assert_eq!(item.args.items.len(), 2); assert_eq!(item.name.resolve(source).unwrap(), "hello");
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DeclImpl
[src]
Parse implementation for an impl.
Examples
use rune::{parse_all, ast}; parse_all::<ast::DeclImpl>("impl Foo {}").unwrap(); parse_all::<ast::DeclImpl>("impl Foo { fn test(self) { } }").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DeclStruct
[src]
Parse implementation for a struct.
Examples
use rune::{parse_all, ast}; parse_all::<ast::DeclStruct>("struct Foo").unwrap(); parse_all::<ast::DeclStruct>("struct Foo ( a, b, c )").unwrap(); parse_all::<ast::DeclStruct>("struct Foo { a, b, c }").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DeclUse
[src]
Parsing an use declaration.
Examples
use rune::{parse_all, ast}; parse_all::<ast::DeclUse>("use foo;")?; parse_all::<ast::DeclUse>("use foo::bar;")?; parse_all::<ast::DeclUse>("use foo::bar::baz;")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Default
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Dot
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for DotDot
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Else
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for EmptyBody
[src]
Parse implementation for an empty struct body.
Examples
use rune::{parse_all, ast}; parse_all::<ast::EmptyBody>("Foo").unwrap();
fn parse(_: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Enum
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Eq
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprAwait
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprBlock
[src]
Parse implementation for a block.
Examples
use rune::{parse_all, ast}; let block = parse_all::<ast::ExprBlock>("{}")?.item; assert_eq!(block.exprs.len(), 0); assert!(block.trailing_expr.is_none()); let block = parse_all::<ast::ExprBlock>("{ foo }")?.item; assert_eq!(block.exprs.len(), 0); assert!(block.trailing_expr.is_some()); let block = parse_all::<ast::ExprBlock>("{ foo; }")?.item; assert_eq!(block.exprs.len(), 1); assert!(block.trailing_expr.is_none()); let block = parse_all::<ast::ExprBlock>(r#" { let foo = 42; let bar = "string"; baz } "#)?.item; assert_eq!(block.exprs.len(), 2); assert!(block.trailing_expr.is_some());
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprBreak
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprClosure
[src]
Parse implementation for a function.
Examples
use rune::{parse_all, ast}; parse_all::<ast::ExprClosure>("async || 42").unwrap(); parse_all::<ast::ExprClosure>("|| 42").unwrap(); parse_all::<ast::ExprClosure>("|| { 42 }").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprElse
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprElseIf
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprFor
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprGroup
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprIf
[src]
Parse an if statement.
Examples
use rune::{parse_all, ast}; parse_all::<ast::ExprIf>("if 0 { }")?; parse_all::<ast::ExprIf>("if 0 { } else { }")?; parse_all::<ast::ExprIf>("if 0 { } else if 0 { } else { }")?; parse_all::<ast::ExprIf>("if let v = v { }")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprIs
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprIsNot
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprLet
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprLoop
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprMatch
[src]
Parse a match statement.
Examples
use rune::{ParseAll, parse_all, ast}; parse_all::<ast::ExprMatch>("match 0 { _ => 1, }")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprMatchBranch
[src]
Parse a match statement.
Examples
use rune::{ParseAll, parse_all, ast}; parse_all::<ast::ExprMatchBranch>("1 => { foo }")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprReturn
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprSelect
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprUnary
[src]
Parse a unary statement.
Examples
use rune::{parse_all, ast}; parse_all::<ast::ExprUnary>("!0").unwrap(); parse_all::<ast::ExprUnary>("*foo").unwrap(); parse_all::<ast::ExprUnary>("&foo").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprWhile
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for ExprYield
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Fn
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for For
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Hash
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Ident
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for If
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Impl
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for In
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Is
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Label
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Let
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitBool
[src]
Parsing a unit literal
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitBool>("true").unwrap(); parse_all::<ast::LitBool>("false").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitByte
[src]
Parse a byte literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitByte>("b'a'").unwrap(); parse_all::<ast::LitByte>("b'\\0'").unwrap(); parse_all::<ast::LitByte>("b'\\n'").unwrap(); parse_all::<ast::LitByte>("b'\\r'").unwrap(); parse_all::<ast::LitByte>("b'\\\\''").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitByteStr
[src]
Parse a string literal.
Examples
use rune::{parse_all, ast}; let s = parse_all::<ast::LitByteStr>("b\"hello world\"")?; assert_eq!(&s.resolve()?[..], &b"hello world"[..]); let s = parse_all::<ast::LitByteStr>("b\"hello\\nworld\"")?; assert_eq!(&s.resolve()?[..], &b"hello\nworld"[..]);
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitChar
[src]
Parse a character literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitChar>("'a'")?; parse_all::<ast::LitChar>("'\\0'")?; parse_all::<ast::LitChar>("'\\n'")?; parse_all::<ast::LitChar>("'\\r'")?; parse_all::<ast::LitChar>("'\\''")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitNumber
[src]
Parse a number literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitNumber>("42")?; parse_all::<ast::LitNumber>("42.42")?; parse_all::<ast::LitNumber>("0.42")?; parse_all::<ast::LitNumber>("0.42e10")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitObject
[src]
Parse an object literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitObject>("Foo {\"foo\": 42}").unwrap(); parse_all::<ast::LitObject>("#{\"foo\": 42}").unwrap(); parse_all::<ast::LitObject>("#{\"foo\": 42,}").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitObjectFieldAssign
[src]
Parse an object literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitObjectFieldAssign>("\"foo\": 42").unwrap(); parse_all::<ast::LitObjectFieldAssign>("\"foo\": 42").unwrap(); parse_all::<ast::LitObjectFieldAssign>("\"foo\": 42").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitStr
[src]
Parse a string literal.
Examples
use rune::{ParseAll, parse_all, ast}; let item = parse_all::<ast::LitStr>("\"hello world\"")?; assert_eq!(item.resolve()?, "hello world"); let item = parse_all::<ast::LitStr>("\"hello\\nworld\"")?; assert_eq!(item.resolve()?, "hello\nworld");
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitTemplate
[src]
Parse a string literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitTemplate>("`hello world`")?; parse_all::<ast::LitTemplate>("`hello\\n world`")?;
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitTuple
[src]
Parse a tuple literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitTuple>("(1, \"two\")").unwrap(); parse_all::<ast::LitTuple>("(1, 2,)").unwrap(); parse_all::<ast::LitTuple>("(1, 2, foo())").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitUnit
[src]
Parsing a unit literal
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitUnit>("()").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for LitVec
[src]
Parse an array literal.
Examples
use rune::{parse_all, ast}; parse_all::<ast::LitVec>("[1, \"two\"]").unwrap(); parse_all::<ast::LitVec>("[1, 2,]").unwrap(); parse_all::<ast::LitVec>("[1, 2, foo()]").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Loop
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Match
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Mul
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Not
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for OpenBrace
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for OpenBracket
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for OpenParen
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Or
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for PatObject
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for PatObjectItem
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for PatTuple
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for PatVec
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Path
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Pipe
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Return
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Rocket
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Scope
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Select
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Self_
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for SemiColon
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Star
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Struct
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for StructBody
[src]
Parse implementation for a struct body.
Examples
use rune::{parse_all, ast}; parse_all::<ast::StructBody>("{ a, b, c }").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Try
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for TupleBody
[src]
Parse implementation for a struct body.
Examples
use rune::{parse_all, ast}; parse_all::<ast::TupleBody>("( a, b, c )").unwrap();
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Underscore
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Use
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for While
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl Parse for Yield
[src]
fn parse(parser: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl<T, S> Parse for Parenthesized<T, S> where
T: Parse,
S: Peek + Parse,
[src]
T: Parse,
S: Peek + Parse,
Parse function arguments.
Examples
use rune::{parse_all, ast}; parse_all::<ast::Parenthesized<ast::Expr, ast::Comma>>("(1, \"two\")")?; parse_all::<ast::Parenthesized<ast::Expr, ast::Comma>>("(1, 2,)")?; parse_all::<ast::Parenthesized<ast::Expr, ast::Comma>>("(1, 2, foo())")?;