Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit a07a7dc

Browse files
committed
run prettier
1 parent 04ee7ef commit a07a7dc

File tree

6 files changed

+53
-47
lines changed

6 files changed

+53
-47
lines changed

Diff for: babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
33
};

Diff for: docs/architecture.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ it is 10% architectural decisions and 90% hard work on the fine-grained details.
1212

1313
The architectural decisions will mostly affect two categories:
1414

15-
* the performance of your compiler
16-
* how nice it is to consume your AST
15+
- the performance of your compiler
16+
- how nice it is to consume your AST
1717

1818
## Performance
1919

20-
The key to a performant Rust program is to *make less momory allocations* and *use less cpu cycles*.
20+
The key to a performant Rust program is to _make less momory allocations_ and _use less cpu cycles_.
2121

2222
It is mostly transparent when a momory allocation is made just by looking for heap allocated structs such as `Vec` or `Box`.
2323
Reasoning about their usage will give you a sense of how fast your program will be.

Diff for: docs/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ so you don't have to take the same struggling journey as I had.
1616
There are only a handful of developers on the Rust side, and I would like to see you here and join us,
1717
so we can build better and faster tools for ourselves to enjoy.
1818

19-
❤️ 🦀 ❤️
19+
❤️ 🦀 ❤️

Diff for: docs/references.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ title: References
33
---
44

55
# Parsers written in Rust / Go
6-
* [swc](https://swc.rs)
7-
* [Rome](https://rome.tools)
8-
* [esbuild](https://esbuild.github.io)
6+
7+
- [swc](https://swc.rs)
8+
- [Rome](https://rome.tools)
9+
- [esbuild](https://esbuild.github.io)
910

1011
# Parsers written in Javascript
11-
* [acorn](https://babeljs.io)
12-
* [babel](https://github.com/acornjs/acorn)
12+
13+
- [acorn](https://babeljs.io)
14+
- [babel](https://github.com/acornjs/acorn)

Diff for: docusaurus.config.js

+33-29
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require('prism-react-renderer/themes/github');
5-
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
4+
const lightCodeTheme = require("prism-react-renderer/themes/github");
5+
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
66

77
/** @type {import('@docusaurus/types').Config} */
88
const config = {
9-
title: 'Write a JavaScript Compiler in Rust',
10-
url: 'https://boshen.github.io',
11-
baseUrl: '/javascript-compiler-in-rust/',
12-
onBrokenLinks: 'throw',
13-
onBrokenMarkdownLinks: 'throw',
14-
onDuplicateRoutes: 'throw',
15-
organizationName: 'Boshen', // Usually your GitHub org/user name.
16-
projectName: 'javascript-compiler-in-rust', // Usually your repo name.
9+
title: "Write a JavaScript Compiler in Rust",
10+
url: "https://boshen.github.io",
11+
baseUrl: "/javascript-compiler-in-rust/",
12+
onBrokenLinks: "throw",
13+
onBrokenMarkdownLinks: "throw",
14+
onDuplicateRoutes: "throw",
15+
organizationName: "Boshen", // Usually your GitHub org/user name.
16+
projectName: "javascript-compiler-in-rust", // Usually your repo name.
1717
i18n: {
18-
defaultLocale: 'en',
19-
locales: ['en'],
18+
defaultLocale: "en",
19+
locales: ["en"],
2020
},
2121
presets: [
2222
[
23-
'classic',
23+
"classic",
2424
/** @type {import('@docusaurus/preset-classic').Options} */
2525
({
2626
docs: {
27-
sidebarPath: require.resolve('./sidebars.js'),
28-
editUrl: 'https://github.com/Boshen/javascript-compiler-in-rust/tree/main/docs/',
27+
sidebarPath: require.resolve("./sidebars.js"),
28+
editUrl:
29+
"https://github.com/Boshen/javascript-compiler-in-rust/tree/main/docs/",
2930
showReadingTime: true,
3031
},
3132
blog: {
32-
editUrl: 'https://github.com/Boshen/javascript-compiler-in-rust/tree/main/blog',
33+
editUrl:
34+
"https://github.com/Boshen/javascript-compiler-in-rust/tree/main/blog",
3335
showReadingTime: true,
3436
},
3537
theme: {
36-
customCss: require.resolve('./src/css/custom.css'),
38+
customCss: require.resolve("./src/css/custom.css"),
3739
},
3840
}),
3941
],
@@ -42,31 +44,33 @@ const config = {
4244
themeConfig:
4345
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
4446
({
45-
metadata: [{name: 'keywords', content: 'rust, javascript, compiler, tutorial'}],
47+
metadata: [
48+
{ name: "keywords", content: "rust, javascript, compiler, tutorial" },
49+
],
4650
colorMode: {
47-
defaultMode: 'dark',
51+
defaultMode: "dark",
4852
},
4953
navbar: {
50-
title: 'Home',
54+
title: "Home",
5155
items: [
5256
{
53-
type: 'doc',
54-
docId: 'intro',
55-
position: 'left',
56-
label: 'Book',
57+
type: "doc",
58+
docId: "intro",
59+
position: "left",
60+
label: "Book",
5761
},
58-
{to: '/blog', label: 'Tutorials', position: 'left'},
62+
{ to: "/blog", label: "Tutorials", position: "left" },
5963
{
60-
href: 'https://github.com/Boshen/javascript-compiler-in-rust',
61-
label: 'GitHub',
62-
position: 'right',
64+
href: "https://github.com/Boshen/javascript-compiler-in-rust",
65+
label: "GitHub",
66+
position: "right",
6367
},
6468
],
6569
},
6670
prism: {
6771
theme: lightCodeTheme,
6872
darkTheme: darkCodeTheme,
69-
additionalLanguages: ['rust']
73+
additionalLanguages: ["rust"],
7074
},
7175
}),
7276
};

Diff for: sidebars.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
44
const sidebars = {
55
tutorialSidebar: [
6-
'intro',
7-
'architecture',
8-
'lexer',
9-
'ast',
10-
'parser',
11-
'semantics_analysis',
12-
'typescript',
13-
'references'
6+
"intro",
7+
"architecture",
8+
"lexer",
9+
"ast",
10+
"parser",
11+
"semantics_analysis",
12+
"typescript",
13+
"references",
1414
],
1515
};
1616

0 commit comments

Comments
 (0)