a bunch of grammar fixes

This commit is contained in:
Francesco Cozzuto
2022-08-17 23:58:28 +02:00
parent 7e0144faa3
commit 71e8a9e4cb
14 changed files with 42 additions and 75 deletions
+3 -3
View File
@@ -145,7 +145,7 @@ static bool parseIntegerOperand(Context *ctx, Error *error, Operand *op)
long long int buffer = 0;
do {
// Transform each digit into it's integer value.
// Transform each digit into its integer value.
int d = ctx->str[ctx->cur] - '0';
assert(d >= 0 && d <= 9);
@@ -179,7 +179,7 @@ static bool parseFloatingOperand(Context *ctx, Error *error, Operand *op)
double buffer = 0;
do {
// Transform each digit into it's integer value.
// Transform each digit into its integer value.
int d = ctx->str[ctx->cur] - '0';
assert(d >= 0 && d <= 9);
@@ -196,7 +196,7 @@ static bool parseFloatingOperand(Context *ctx, Error *error, Operand *op)
double q = 1;
do {
// Transform each digit into it's integer value.
// Transform each digit into its integer value.
int d = ctx->str[ctx->cur] - '0';
assert(d >= 0 && d <= 9);
+1 -1
View File
@@ -1,3 +1,3 @@
Here are implemented the language's builtin variables. Each file defines it's values and exposes them through an array of `StaticMapSlot`s. These values can then be accessed from within the language by wrapping these arrays in static map objects (check src/o_staticmap.c to know more).
Here are implemented the language's builtin variables. Each file defines its values and exposes them through an array of `StaticMapSlot`s. These values can then be accessed from within the language by wrapping these arrays in static map objects (check src/o_staticmap.c to know more).
The array of `StaticMapSlot`s defined by `basic.c` is the root of the builtin object tree. All other arrays are referred by it.
+1 -1
View File
@@ -17,7 +17,7 @@ Executable *compile(Source *src, Error *error, CompilationErrorType *errtyp)
return NULL;
}
// NOTE: The AST is stored in the BPAlloc. It's
// NOTE: The AST is stored in the BPAlloc. Its
// lifetime is the same as the pool.
AST *ast = parse(src, alloc, error);
+1 -1
View File
@@ -56,7 +56,7 @@
** | HOW ARE POINTERS UPDATED? |
** | Basically, when an object is moved from the old to the new heap, the |
** | location of the object in the old heap is overwritten with a placeholder |
** | object that holds the new location. Then all of it's references are |
** | object that holds the new location. Then all of its references are |
** | iterated over and if they refer to placeholders they're updated with the |
** | new location of the object. If the references don't refer to placeholder |
** | objects, then the referred objects are moved too. This is a recursive |
+1 -1
View File
@@ -99,7 +99,7 @@ Source *Source_FromFile(const char *file, Error *error)
return NULL;
}
// Open the file and get it's size.
// Open the file and get its size.
// at the end of the block, the file
// cursor will point at the start of
// the file.
+1 -1
View File
@@ -243,7 +243,7 @@ int utf8_sequence_to_utf32_codepoint(const char *utf8_data, int nbytes, uint32_t
** value is equal to [nbytes].
**
** NOTE: You can check the validity of a UTF-8 string
** by calling this function and checking that it's
** by calling this function and checking that its
** return value is not negative.
*/
int utf8_strlen(const char *utf8_data, int nbytes)