Skip to content

Commit

Permalink
Add binary literals to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
NthPortal committed Jul 28, 2019
1 parent ef1f332 commit d82ea91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/01-lexical-syntax.md
Expand Up @@ -345,12 +345,14 @@ Literal ::= [‘-’] integerLiteral
### Integer Literals

```ebnf
integerLiteral ::= (decimalNumeral | hexNumeral)
integerLiteral ::= (decimalNumeral | hexNumeral | binNumeral)
[‘L’ | ‘l’]
decimalNumeral ::= ‘0’ | nonZeroDigit {digit}
hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit {hexDigit}
binNumeral ::= ‘0’ (‘b’ | ‘B’) binDigit {binDigit}
digit ::= ‘0’ | nonZeroDigit
nonZeroDigit ::= ‘1’ | … | ‘9’
binDigit ::= ‘0’ | ‘1’
```

Values of type `Int` are all integer
Expand Down

0 comments on commit d82ea91

Please sign in to comment.