Skip to content

Commit

Permalink
chore(docs): Fix typos (#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
omahs authored Nov 7, 2024
1 parent 328cf01 commit a8a3f78
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/contributor/commits_pull_requests_and_merging.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When committing, it's often useful to use the `git add -p` workflow to decide on

### Conventional Commits

As of the [6202982](https://github.com/grain-lang/grain/commit/620298225faf35265e7285fe3d4d2c8dee72dba3) commit, Grain follows the [Conventional Commits (v1.0.0)](https://www.conventionalcommits.org/en/v1.0.0/) specification. Following this convention allows us to provide an automated release processs that also generates a detailed changelog.
As of the [6202982](https://github.com/grain-lang/grain/commit/620298225faf35265e7285fe3d4d2c8dee72dba3) commit, Grain follows the [Conventional Commits (v1.0.0)](https://www.conventionalcommits.org/en/v1.0.0/) specification. Following this convention allows us to provide an automated release process that also generates a detailed changelog.

As described by the spec, our commit messages should be written as:

Expand Down
4 changes: 2 additions & 2 deletions docs/contributor/compiler_walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The definition for the Grain AST (which we often refer to as the parsetree) can

## Well-formedness

This is just a fancy term for asking the question "does this program—for the most part—make sense?" In Grain, type identifers must always start with a capital letter, so there's a well-formedness check that enforces this. In general, we like to be as lenient as possible while parsing and provide helpful error messages from well-formedness checks. If a user writes a program like `type foo = ...`, it's much better to say `Error: 'foo' should be capitalized` rather than `Syntax error`.
This is just a fancy term for asking the question "does this program—for the most part—make sense?" In Grain, type identifiers must always start with a capital letter, so there's a well-formedness check that enforces this. In general, we like to be as lenient as possible while parsing and provide helpful error messages from well-formedness checks. If a user writes a program like `type foo = ...`, it's much better to say `Error: 'foo' should be capitalized` rather than `Syntax error`.

You can find the Grain well-formedness checks in [parsing/well_formedness.re](https://github.com/grain-lang/grain/blob/main/compiler/src/parsing/well_formedness.re).

Expand All @@ -68,7 +68,7 @@ After typechecking, we have more information about the program. We do a second w

## Linearization

In this step, we convert the typedtree into [A-normal Form](https://en.wikipedia.org/wiki/A-normal_form), or ANF. This purpose of this step is to create a linear set of expressions that could be performed in order from start to finish. For example, given the expression `foo(3 * 4, bar(5))`, we'd want to produce:
In this step, we convert the typedtree into [A-normal Form](https://en.wikipedia.org/wiki/A-normal_form), or ANF. The purpose of this step is to create a linear set of expressions that could be performed in order from start to finish. For example, given the expression `foo(3 * 4, bar(5))`, we'd want to produce:

```plaintext
$arg1 := 3 * 4
Expand Down
2 changes: 1 addition & 1 deletion docs/contributor/memory_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Note that `load_swap` is one of the aforementioned exceptions which does not `in
**References are callee-owned.** This has a couple of implications:

- If a function is called with an argument, it is the responsibility of that function to `decRef` that argument.
- If a value is passed to a function with a reference count of `n`, when it returns, it will have the a reference count of `n-1` (unless it was stored in an external location, in which case the reference count may be higher).
- If a value is passed to a function with a reference count of `n`, when it returns, it will have the reference count of `n-1` (unless it was stored in an external location, in which case the reference count may be higher).

## Disabling the Garbage Collector

Expand Down
10 changes: 5 additions & 5 deletions docs/contributor/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ searching and comparing strings. Strings in Grain are not normalized.
JavaScript strings are not encoded in UTF-8.

JavaScript uses UCS-2 with unpaired surrogate codepoints. Each codepoint is
represented by two bytes. A surrograte pair is a pair of codepoints used to
represent a codepoint greater than U+FFFF. DOMString is the same but with a
replacement character, U+FFFD, for unpaired surrogate codepoints. A USVString
is the same but without unpaired surrogate codepoints. A CSSOMString is the
represented by two bytes. A surrogate pair is a pair of codepoints used to
represent a codepoint greater than U+FFFF. DOMString is the same but with a
replacement character, U+FFFD, for unpaired surrogate codepoints. A USVString
is the same but without unpaired surrogate codepoints. A CSSOMString is the
same as a DOMString.

A JavaScript string containing one or more unpaired surrogate codepoints is not
a valid UTF-16 string. USVString, DOMString and CSSOMString are valid UTF-16
a valid UTF-16 string. USVString, DOMString and CSSOMString are valid UTF-16
strings. The encoder converts to USVString.

0 comments on commit a8a3f78

Please sign in to comment.