things & stuff
This commit is contained in:
parent
8535225167
commit
d4af160f80
|
@ -26,6 +26,7 @@ pub fn report_panic(err: LErr) {
|
|||
let i = first_span.start;
|
||||
let j = second_span.end;
|
||||
let label = Label::new((entry.input, i..j))
|
||||
.with_color(Color::Yellow)
|
||||
.with_message(format!("({order}) calling `{fn_name}` with `{arguments}`"));
|
||||
order += 1;
|
||||
stack.push(label);
|
||||
|
|
|
@ -196,12 +196,9 @@ pub fn run(src: &'static str) {
|
|||
|
||||
pub fn main() {
|
||||
let src = "
|
||||
loop (10) with {
|
||||
(0) -> :done
|
||||
(n) -> {
|
||||
print! (n)
|
||||
recur (dec (n))
|
||||
}
|
||||
loop (100000, 1) with {
|
||||
(1, acc) -> acc
|
||||
(n, acc) -> recur (dec (n), add (n, acc))
|
||||
}
|
||||
";
|
||||
run(src);
|
||||
|
|
|
@ -326,7 +326,7 @@ impl<'src> Process<'src> {
|
|||
result
|
||||
}
|
||||
// TODO: partially applied functions shnould work! In #15
|
||||
(Fn(_f), Args(_args)) => todo!(),
|
||||
(Fn(_f), Args(_partial_args)) => todo!(),
|
||||
(_, Keyword(_)) => Ok(Nil),
|
||||
(_, Args(_)) => self.panic("only functions and keywords may be called".to_string()),
|
||||
(Base(f), Tuple(args)) => match f {
|
||||
|
|
Loading…
Reference in New Issue
Block a user