This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn parse_if<'a>(input: &mut Peekable<TokenIterator<'a>>) -> Result<Stmt, ParseError> { | |
| Ok(Stmt::Expr(Node::IntConst(3))) | |
| } | |
| fn parse_expr_stmt<'a>(input: &mut Peekable<TokenIterator<'a>>) -> Result<Stmt, ParseError> { | |
| Ok(Stmt::Expr(Node::IntConst(4))) | |
| } | |
| fn parse_stmt<'a>(input: &mut Peekable<TokenIterator<'a>>) -> Result<Stmt, ParseError> { | |
| let mut parser = match input.peek() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn simple_fn(x: i32) -> i32 { | |
| x + 100 | |
| } | |
| trait FooFn { | |
| fn foo(&self); | |
| } | |
| impl FooFn for Fn(i32)->i32 { | |
| fn foo(&self) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //use std::fmt; | |
| #include <iostream> | |
| // | |
| //struct Foo { | |
| // x: i32 | |
| //} | |
| struct Foo { |
NewerOlder