aboutsummaryrefslogtreecommitdiff
path: root/language
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-11-02 20:38:48 -0700
committerMelody Horn <melody@boringcactus.com>2020-11-02 20:38:48 -0700
commitd17e0f73a57eb65c82eb942bf4b33e3c6d8335c3 (patch)
tree86fabc3114bbe15903dced823eb8e54365bbe62d /language
parentd43b22c6fa59268a29bfe9eb685c3a55dccc257b (diff)
downloadspec-d17e0f73a57eb65c82eb942bf4b33e3c6d8335c3.tar.gz
spec-d17e0f73a57eb65c82eb942bf4b33e3c6d8335c3.zip
update examples to use precise integer types
Diffstat (limited to 'language')
-rw-r--r--language/scanning.rst6
-rw-r--r--language/type-definition.rst6
2 files changed, 6 insertions, 6 deletions
diff --git a/language/scanning.rst b/language/scanning.rst
index 044441d..2c5e290 100644
--- a/language/scanning.rst
+++ b/language/scanning.rst
@@ -11,18 +11,18 @@ Scanning
Punctuators, string literals, and character constants do not require explicit separation from adjacent tokens.
keyword
- One of the literal words ``bool``, ``break``, ``byte``,
+ One of the literal words ``bool``, ``break``,
``case``, ``const``, ``continue``,
``default``, ``do``,
``else``, ``enum``,
``false``, ``float32``, ``float64``, ``for``, ``fragile``, ``function``,
- ``if``, :crowbar:ref:`include <IncludeStatement>`, ``int8``, ``int16``, ``int32``, ``int64``, ``intaddr``,
+ ``if``, :crowbar:ref:`include <IncludeStatement>`, ``int8``, ``int16``, ``int32``, ``int64``, ``intaddr``, ``intmax``, ``intsize``,
``long``,
``opaque``,
``return``,
``short``, ``sizeof``, ``struct``, ``switch``,
``true``,
- ``uint8``, ``uint16``, ``uint32``, ``uint64``, ``uintaddr``, ``union``,
+ ``uint8``, ``uint16``, ``uint32``, ``uint64``, ``uintaddr``, ``uintmax``, ``uintsize``, ``union``,
``void``,
or ``while``.
diff --git a/language/type-definition.rst b/language/type-definition.rst
index 9e3d7c4..7b90934 100644
--- a/language/type-definition.rst
+++ b/language/type-definition.rst
@@ -67,9 +67,9 @@ Defining Types
enum TokenType type;
switch (type) {
- case Identifier: (const char) * name;
- case Constant: int value;
- case Operator: char op;
+ case Identifier: (const byte) * name;
+ case Constant: intmax value;
+ case Operator: (const byte) * op;
case Whitespace: ;
}
}