feat: small ui improvements
This commit is contained in:
parent
980b92f631
commit
f1bc675869
@ -51,6 +51,7 @@
|
|||||||
--c-primary: rgb(255, 180, 180);
|
--c-primary: rgb(255, 180, 180);
|
||||||
--c-pink: #374259;
|
--c-pink: #374259;
|
||||||
--c-link: #0284c7;
|
--c-link: #0284c7;
|
||||||
|
--c-border-1: #909090;
|
||||||
|
|
||||||
--c-nav-bg: rgb(255, 247, 255, 0.5);
|
--c-nav-bg: rgb(255, 247, 255, 0.5);
|
||||||
--c-secondary: rgba(255, 255, 240, 0.5);
|
--c-secondary: rgba(255, 255, 240, 0.5);
|
||||||
|
@ -60,6 +60,10 @@
|
|||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.markdown > p > code {
|
||||||
|
border: solid 1px var(--c-border-1);
|
||||||
|
}
|
||||||
|
|
||||||
.markdown > pre {
|
.markdown > pre {
|
||||||
margin: 0.5em 0;
|
margin: 0.5em 0;
|
||||||
padding: 0.75em 0.75em;
|
padding: 0.75em 0.75em;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { spawn } from "node:child_process";
|
import { spawn } from "node:child_process";
|
||||||
import { leftTrimDedent } from "../components/utils";
|
import { leftTrimDedent } from "../components/utils";
|
||||||
import { HighlightLevel } from "./types";
|
import { HighlightLevel } from "./types";
|
||||||
import type { LexError, SyntaxError, SemanticError, Token, TokenizeResult, TokenType } from "./types";
|
import type { LexError, SyntaxError, Token, TokenizeResult, TokenType } from "./types";
|
||||||
|
|
||||||
const error_classes = "underline underline-offset-4 decoration-wavy decoration-red-500";
|
const error_classes = "underline underline-offset-4 decoration-wavy decoration-red-500";
|
||||||
|
|
||||||
|
@ -10,23 +10,30 @@ import Code from "../../../components/Code.astro"
|
|||||||
|
|
||||||
```ebnf
|
```ebnf
|
||||||
Int = hexadecimal_number
|
Int = hexadecimal_number
|
||||||
|
| octal_number
|
||||||
|
| binary_number
|
||||||
| decimal_number
|
| decimal_number
|
||||||
|
|
||||||
hexadecimal_number = "0", ("x" | "X"), hexadecimal_digit+
|
hexadecimal_number = "0", ("x" | "X"), hexadecimal_digit+
|
||||||
decimal_number = decimal_digit+
|
decimal_number = decimal_digit+
|
||||||
|
octal_number = "0", ("o" | "O"), octal_digit+
|
||||||
|
binary_number = "0", "b", binary_digit +
|
||||||
```
|
```
|
||||||
|
|
||||||
<Code thpcode={`
|
<Code thpcode={`
|
||||||
12345
|
12345
|
||||||
01234 // This is a decimal number, not an octal number
|
01234 // This is a decimal number, not an octal number
|
||||||
|
0o755 // This is octal
|
||||||
|
0b0110
|
||||||
0xff25
|
0xff25
|
||||||
0XFfaA
|
0XFfaA
|
||||||
`} />
|
`} />
|
||||||
|
|
||||||
`TODO`: Implement octal `0o777` and binary `0b0110`.
|
|
||||||
|
|
||||||
`TODO`: Allow underscores `_` between any number: `1_000_000`.
|
`TODO`: Allow underscores `_` between any number: `1_000_000`.
|
||||||
|
|
||||||
|
`TODO`: Make it an error to have a number start with a leading zero,
|
||||||
|
to eliminate confusion with proper octal and legacy PHP octal.
|
||||||
|
|
||||||
|
|
||||||
## Float
|
## Float
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user