Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add "with" to tokens. clean up match syntax. think about apply.
- Loading branch information
Showing
3 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
5 changes: 4 additions & 1 deletion
5
zero-compiler/src/main/java/zero/compiler/parser/Precedence.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
/* (C) 2012 Matt O'Connor <thegreendragon@gmail.com> */ | ||
package zero.compiler.parser; | ||
|
||
public class Precedence { | ||
public final class Precedence { | ||
public static final int VAL = 0; | ||
public static final int PLUS = 3; | ||
public static final int TIMES = 4; | ||
public static final int APPLY = 9; | ||
|
||
private Precedence() {} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,5 @@ val fib = fn n -> | |
match n with | ||
| 0 -> 0 | ||
| 1 -> 1 | ||
| _ -> | ||
else fib (n-1) + fib (n-2) | ||
end | ||
end |