diff options
-rw-r--r-- | syntax.md | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -15,6 +15,7 @@ A Crowbar source file is read into memory in two phases: *scanning* (which conve # Scanning A *token* is one of the following kinds of token: + - a *keyword*, - an *identifier*, - a *constant*, @@ -26,6 +27,7 @@ Tokens are separated by either *whitespace* or a *comment*. ## Keywords A *keyword* is one of the following literal words: + - `bool` - `break` - `case` @@ -79,6 +81,7 @@ Subsequent characters may have any of the above-listed Unicode categories, or on ## Constants A *constant* can have one of six types: + - a *decimal constant*, a sequence of characters drawn from the set {`0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `_`}; - a *binary constant*, a prefix (either `0b` or `0B`) followed by a sequence of characters drawn from the set {`0`, `1`, `_`}; - an *octal constant*, the prefix `0o` followed by a sequence of characters drawn from the set {`0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `_`}; @@ -92,6 +95,7 @@ A *constant* can have one of six types: ### Escape Sequences The following sequences of characters are *escape sequences*: + - `\'` - `\"` - `\\` @@ -112,6 +116,7 @@ It then ends with a `"`. ## Punctuators The following sequences of characters form *punctuators*: + - `[` - `]` - `(` @@ -130,7 +135,7 @@ The following sequences of characters form *punctuators*: - `&` - `|` - `^` -- the tilde, `~` (given special treatment on this line due to [a bug in the Markdown renderer that sr.ht uses](https://github.com/miyuchina/mistletoe/issues/91)) +- `~` - `>` - `<` - `=` |