Created
April 19, 2017 17:10
-
-
Save goffrie/2dacbe5aefe7e4ea83d4b4da876ef39e to your computer and use it in GitHub Desktop.
Optional semicolons
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
diff --git a/examples/demo.rs b/examples/demo.rs | |
index ff14042..2ec627d 100644 | |
--- a/examples/demo.rs | |
+++ b/examples/demo.rs | |
@@ -150,9 +150,14 @@ mod parser { | |
statements[s] => Program { stmts: s } | |
} | |
+ optionalSemi: () { | |
+ => (), | |
+ Semi => (), | |
+ } | |
+ | |
statements: Vec<Expr> { | |
=> vec![], | |
- statements[mut st] assign[e] Semi => { | |
+ statements[mut st] assign[e] optionalSemi => { | |
st.push(e); | |
st | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment