forked from MightyPork/crsn
Add "sym" and "def" instructions, add argument naming
This commit is contained in:
@@ -24,7 +24,7 @@ impl CrsnExtension for StackOps {
|
||||
"stacks"
|
||||
}
|
||||
|
||||
fn parse_op(&self, keyword: &str, args: TokenParser) -> Result<ParseRes<Op>, CrsnError> {
|
||||
fn parse_op<'a>(&self, keyword: &str, args: TokenParser<'a>) -> Result<ParseRes<'a, Op>, CrsnError> {
|
||||
parse::parse(keyword, args)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use crsn::module::ParseRes;
|
||||
|
||||
use crate::defs::StackOp;
|
||||
|
||||
pub(crate) fn parse(keyword: &str, mut args: TokenParser) -> Result<ParseRes<Op>, CrsnError> {
|
||||
pub(crate) fn parse<'a>(keyword: &str, mut args: TokenParser<'a>) -> Result<ParseRes<'a, Op>, CrsnError> {
|
||||
Ok(ParseRes::ext(match keyword {
|
||||
"stack" => {
|
||||
StackOp::NewStack {
|
||||
|
||||
Reference in New Issue
Block a user