Skip to content

Commit

Permalink
chore: fix invalid code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
Jabolol committed Jan 19, 2025
1 parent b2d72a3 commit 1c7677d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/developer-manual/contributing/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Before you begin, ensure you have the following tools installed:
To ensure the compiler was built successfully, run:

```bash
./frostc --version
./frostc -h
```

This should display the version information for the Frost compiler.
Expand Down
8 changes: 4 additions & 4 deletions docs/user-manual/basic-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ Frost's backend is LLVM, which means we inherit the use of the

```bash
# Apply optimization passes
frostc source.ff | opt -O3 -S | lli
frostc -i source.ff | opt -O3 -S | lli

# Apply custom optimization pipeline, e.g., mem2reg
frostc source.ff | opt -passes=mem2reg -S | lli
frostc -i source.ff | opt -passes=mem2reg -S | lli
```

## Language Fundamentals
Expand Down Expand Up @@ -231,14 +231,14 @@ the current scope. It can also be a block:
import "https://frost-lang.deno.dev/std/lib.ff"
% Allocation with automatic cleanup
let buffer: *byte = malloc(size)
buffer: *byte = malloc(size)
defer {
free(buffer)
printf(">> Memory freed\n")
}
% Pointer operations
ptr = buffer + offset % Pointer arithmetic
ptr: *byte = buffer + offset % Pointer arithmetic
buffer.* = value % Dereferencing
% Deferred blocks will run at the end of the scope
Expand Down
2 changes: 1 addition & 1 deletion docs/user-manual/syntax/advanced-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defer free(data) % Cleanup
% Pointer operations
ptr.* = 42 % Dereferencing
let offset_ptr = ptr + 1 % Pointer arithmetic
offset: *byte = ptr + 1 % Pointer arithmetic
```

**Safety Features**
Expand Down

0 comments on commit 1c7677d

Please # to comment.