From: NeilBrown Date: Sat, 8 Jun 2019 04:23:05 +0000 (+1000) Subject: scanner: fix some typos in text X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=edb6ad84004330f82b5b4d3c96e47c77c80e9b3f scanner: fix some typos in text Signed-off-by: NeilBrown --- diff --git a/csrc/scanner.mdc b/csrc/scanner.mdc index e54dac6..84eaf4a 100644 --- a/csrc/scanner.mdc +++ b/csrc/scanner.mdc @@ -750,7 +750,7 @@ blank lines that have been skipped. When a Newline leads to the next block of code there is a question of whether the various Newline and OUT/IN tokens should appear to -pbelong to the earlier or later block. This is addressed by processing +belong to the earlier or later block. This is addressed by processing the tokens in two stages based on the relative indent levels of the two blocks (each block has a base indent to which the actual indents are added). @@ -787,12 +787,12 @@ For this we store one more than the number of blank lines as int delayed_lines; int out_next; -Generating these tokens involve two separate pieces of code. +Generating these tokens involves two separate pieces of code. Firstly we need to recognise white space and count the indents and newlines. These are recorded in the above state fields. -Separately we need, on each call to `token_next`, we need to check if +Separately we need, on each call to `token_next`, to check if there are some delayed tokens and if so we need to advance the state information and return one token. @@ -1116,7 +1116,7 @@ parsed too much already. For that there is `reset_token`. tok->txt.len = 0; } -Tokens make not cross into the next `code_node`, and some tokens can +Tokens may not cross into the next `code_node`, and some tokens can include the newline at the and of a `code_node`, we must be able to easily check if we have reached the end. Equally we need to know if we are at the start of a node, as white space is treated a little