Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit 7866ff5

Browse files
committed
Some documentation corrections.
1 parent b57021a commit 7866ff5

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

doc/language/lexical-structure/literals.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,20 @@ atom-literal ::= ':' (upper-identifier |
5757
## String Literal
5858

5959
```ebnf
60-
string-literal ::= '"' ([^#xa#xd#x85#x2028#x2029"\] |
61-
string-escape-sequence)* '"'
62-
string-escape-sequence ::= '\' (string-escape-simple |
63-
string-escape-unicode)
64-
string-escape-simple ::= [0aAbBeEfFnNrRtTvV"\]
65-
string-escape-unicode ::= [uU] hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit
60+
string-literal ::= normal-string-literal |
61+
verbatim-string-literal |
62+
block-string-literal
63+
```
64+
65+
### Normal String Literal
66+
67+
```ebnf
68+
normal-string-literal ::= '"' ([^#xa#xd#x85#x2028#x2029"\] |
69+
string-escape-sequence)* '"'
70+
normal-string-escape-sequence ::= '\' (string-escape-simple |
71+
string-escape-unicode)
72+
normal-string-escape-simple ::= [0aAbBeEfFnNrRtTvV"\]
73+
normal-string-escape-unicode ::= [uU] hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit
6674
```
6775

6876
### Verbatim String Literal

doc/language/types/special/unknown-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ Unlike `any`, however, `unk` only allows a very limited set of operations which
99
are safe on all values. In other words, `unk` is the type-safe counterpart to
1010
`any`.
1111

12-
A value of type `unk` can only be assigned to a location of type `unk`.
12+
A value of type `unk` can only be assigned to a location of type `unk` or `any`.
1313

1414
<!-- TODO: Describe semantics when checking an unk value's type dynamically. -->

0 commit comments

Comments
 (0)