Skip to content

Commit

Permalink
Fixes after suggestions by @franziskuskiefer
Browse files Browse the repository at this point in the history
  • Loading branch information
denismerigoux authored and franziskuskiefer committed Mar 16, 2022
1 parent 0e710b3 commit 44dec97
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/language/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ i ::= array!(t, μ, n) Array type declaration where n is a natural num
| type t = struct([μ]+) Struct declaration (without named fields)
| const x: μ = e Constant declaration
| use crate::* External crate import
| use mod::* Internal module import
d ::= x: τ Function argument
| mut x: τ Mutable function argument
μ ::= unit|bool|u8|U8|i8|I8... Base types
| Seq<μ> Sequence
| String Strings
Expand All @@ -26,8 +28,8 @@ p ::= x Variable pattern
s ::= let p: τ = e Let binding
| let mut p: τ = e Mutable let binding
| x = e Variable reassignment
| x = e? Variable reassignment with error catching
| let p: τ = e? Let binding with error catching
| x = e? Variable reassignment with result/option catching
| let p: τ = e? Let binding with result/option catching
| if e then b (else b) Conditional statements
| c(e) Enum injection
| match e { [c(p) => e]+ } Pattern matching
Expand All @@ -36,6 +38,7 @@ s ::= let p: τ = e Let binding
| b Statement block
e ::= ()|true|false Unit and boolean literals
| n Integer literal
| U8(e)|I8(e)|... Secret integer classification
| "..." String literal
| t([e]+) Array literal
| e as μ Integer casting
Expand Down

0 comments on commit 44dec97

Please sign in to comment.