Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why don't you use "honkit" #654

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: '12.18.2'
cache: 'npm'
- run: sudo apt update
- run: sudo apt install calibre-bin
- run: sudo npm install -g gitbook-cli
- run: gitbook install
- run: npm install
- run: mkdir output
- run: gitbook pdf . ./output/typescript-book-${SHA}.pdf
- run: gitbook epub . ./output/typescript-book-${SHA}.epub
- run: gitbook mobi . ./output/typescript-book-${SHA}.mobi
- run: npx honkit pdf . ./output/typescript-book-${SHA}.pdf
- run: npx honkit epub . ./output/typescript-book-${SHA}.epub
- run: npx honkit mobi . ./output/typescript-book-${SHA}.mobi
- name: upload pdf artifact
uses: actions/upload-artifact@v1
with:
Expand Down
12 changes: 6 additions & 6 deletions docs/compiler/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It is split into the follow key parts:
* Checker (`checker.ts`)
* Emitter (`emitter.ts`)

Each of these get their own unique files in the source. These parts will be explained later on in this chapter.
Each of these get their own unique files in the source. These parts will be explained later on in this chapter.

## Syntax vs. Semantics
Just because something is *syntactically* correct doesn't mean it is *semantically* correct. Consider the following piece of TypeScript code which although *syntactically* valid is *semantically* wrong
Expand All @@ -22,26 +22,26 @@ var foo: number = "not a number";
## Processing Overview
The following is a quick review of how these key parts of the TypeScript compiler compose:

```code
```
SourceCode ~~ scanner ~~> Token Stream
```

```code
```
Token Stream ~~ parser ~~> AST
```

```code
```
AST ~~ binder ~~> Symbols
```
`Symbol` is the primary building block of the TypeScript *semantic* system. As shown the symbols are created as a result of binding. Symbols connect declaration nodes in the AST to other declarations contributing to the same entity.

Symbols + AST are what is used by the checker to *semantically* validate the source code
```code
```
AST + Symbols ~~ checker ~~> Type Validation
```

Finally When a JS output is requested:
```code
```
AST + Checker ~~ emitter ~~> JS
```

Expand Down
Loading