feat: small ui improvements

This commit is contained in:
Araozu 2024-08-26 09:00:43 -05:00
parent 980b92f631
commit f1bc675869
4 changed files with 15 additions and 3 deletions

View File

@ -51,6 +51,7 @@
--c-primary: rgb(255, 180, 180);
--c-pink: #374259;
--c-link: #0284c7;
--c-border-1: #909090;
--c-nav-bg: rgb(255, 247, 255, 0.5);
--c-secondary: rgba(255, 255, 240, 0.5);

View File

@ -60,6 +60,10 @@
padding: 0.5rem 0;
}
.markdown > p > code {
border: solid 1px var(--c-border-1);
}
.markdown > pre {
margin: 0.5em 0;
padding: 0.75em 0.75em;

View File

@ -1,7 +1,7 @@
import { spawn } from "node:child_process";
import { leftTrimDedent } from "../components/utils";
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";

View File

@ -10,23 +10,30 @@ import Code from "../../../components/Code.astro"
```ebnf
Int = hexadecimal_number
| octal_number
| binary_number
| decimal_number
hexadecimal_number = "0", ("x" | "X"), hexadecimal_digit+
decimal_number = decimal_digit+
octal_number = "0", ("o" | "O"), octal_digit+
binary_number = "0", "b", binary_digit +
```
<Code thpcode={`
12345
01234 // This is a decimal number, not an octal number
0o755 // This is octal
0b0110
0xff25
0XFfaA
`} />
`TODO`: Implement octal `0o777` and binary `0b0110`.
`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