Skip to content
Merged
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
6 changes: 3 additions & 3 deletions docs/SPEC.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Carbon Java — Formal Language Specification
# Carbon Lang — Formal Language Specification

This document is the technical reference for the Carbon Java compiler and runtime. It defines every keyword, grammar rule, and behaviour of the language. This is intended for the developers building the compiler and Carbon Lib mod — not for end users.
This document is the technical reference for the Carbon Lang compiler and runtime. It defines every keyword, grammar rule, and behaviour of the language. This is intended for the developers building the compiler and Carbon Lib mod — not for end users.

---

Expand Down Expand Up @@ -208,7 +208,7 @@ Any attempt to reference these should be caught at compile time and reported as

## 12. Compilation Pipeline (Option B — Transpile to Java)

Carbon Java uses a transpile-then-compile approach. `.cj` files are never directly converted to bytecode. Instead they go through a pipeline: `.cj` → token list → AST → `.java` source → `.class` bytecode → live JVM class.
Carbon Lang uses a transpile-then-compile approach. `.cj` files are never directly converted to bytecode. Instead they go through a pipeline: `.cj` → token list → AST → `.java` source → `.class` bytecode → live JVM class.

This makes the compiler easier to build, easier to debug, and produces readable intermediate output at every step.

Expand Down
2 changes: 1 addition & 1 deletion docs/allotrope/allotrope.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Allotrope Mixin System
# Carbon Lang Script — Allotrope Mixin System

Allotrope is the advanced injection system built into Carbon Loader. It allows
mods to inject raw Java code into Carbon Loader's Parent or Child classloader.
Expand Down
4 changes: 2 additions & 2 deletions docs/compiler/compiler-requirements.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Compiler & Runtime Requirements
# Carbon Lang Script — Compiler & Runtime Requirements

This document is intended for the developer building the Carbon Lib mod and
the CJ compiler. It describes everything the compiler and runtime must do.
Expand All @@ -7,7 +7,7 @@ the CJ compiler. It describes everything the compiler and runtime must do.

## Overview

The Carbon Java Script compiler is built into Carbon Lib (a Fabric mod).
The Carbon Lang Script compiler is built into Carbon Lib (a Fabric mod).
It runs entirely at mod-load time — modders never run a compiler themselves.
The compiler takes `.cj` source files and produces JVM bytecode via ASM.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/01_your_first_mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ What each line means:

| Line | What it does |
|------|-------------|
| `carbonjava` | Marks this as a Carbon Java file. Every .cj file starts with this. |
| `carbonjava` | Marks this as a Carbon Lang file. Every .cj file starts with this. |
| `add item` | You are defining a new item. |
| `name (ruby)` | The item's ID. Shows in game as "Ruby". |
| `type ingredient` | This item is used for crafting. |
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/02_folder_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ my_mod.zip
│ ├── models/ ← 3D model files (.glb)
│ └── sounds/ ← Audio files
└── src/ ← All your Carbon Java scripts
└── src/ ← All your Carbon Lang scripts
├── definitions/ ← Where you define things that exist in the game
│ ├── items.cj ← Your custom items
│ ├── blocks.cj ← Your custom blocks
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/03_carbon_mod_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ There are three types of Carbon mod:

| Type | What it means |
|------|--------------|
| `"carbon"` | A normal mod made with Carbon Java scripts. This is what you want. |
| `"carbon"` | A normal mod made with Carbon Lang scripts. This is what you want. |
| `"allotrope"` | An advanced mod that injects code into Carbon Loader itself. Requires Java knowledge. |
| `"fabric"` | A regular Fabric mod that wants to connect to Carbon Loader features. |

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You do **not** need to know Java, Gradle, or any complicated tools. If you can w

## What is a Carbon Mod?

A Carbon mod is a `.zip` file you drop into your mods folder. Inside that zip are scripts written in Carbon Java, plus any textures, models, or sounds your mod uses. Carbon Loader reads the zip, compiles your scripts on the fly, and loads your mod into the game — no building required.
A Carbon mod is a `.zip` file you drop into your mods folder. Inside that zip are scripts written in Carbon Lang, plus any textures, models, or sounds your mod uses. Carbon Loader reads the zip, compiles your scripts on the fly, and loads your mod into the game — no building required.

---

Expand All @@ -24,7 +24,7 @@ A Carbon mod is a `.zip` file you drop into your mods folder. Inside that zip ar
### The Language
| File | What it covers |
|------|---------------|
| <a href="language/01_basics/">language/01_basics/</a> | How Carbon Java works, comments, structure |
| <a href="language/01_basics/">language/01_basics/</a> | How Carbon Lang works, comments, structure |
| <a href="language/02_logic_and_variables/">language/02_logic_and_variables/</a> | If statements, variables, loops |
| <a href="language/03_items/">language/03_items/</a> | Adding custom items, weapons, food, armor |
| <a href="language/04_blocks/">language/04_blocks/</a> | Adding custom blocks |
Expand Down
10 changes: 5 additions & 5 deletions docs/language/01_basics.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The Basics of Carbon Java
# The Basics of Carbon Lang

Carbon Java is designed to be as simple as possible. This page explains how a `.cj` file works from top to bottom.
Carbon Lang is designed to be as simple as possible. This page explains how a `.cj` file works from top to bottom.

---

Expand All @@ -12,7 +12,7 @@ Every single `.cj` file must start with this on the very first line:
carbonjava
```

That's it. No brackets, no semicolons. Just that word. It tells Carbon Loader "this is a Carbon Java file."
That's it. No brackets, no semicolons. Just that word. It tells Carbon Loader "this is a Carbon Lang file."

If you forget it, the file won't load.

Expand All @@ -39,7 +39,7 @@ Use comments to remind yourself what things do, especially when you come back to

## Blocks

Almost everything in Carbon Java is written inside a **block**. A block starts with `add` and ends with `end`.
Almost everything in Carbon Lang is written inside a **block**. A block starts with `add` and ends with `end`.

```
add item
Expand Down Expand Up @@ -102,7 +102,7 @@ The path starts from inside the `src/` folder.

## Indentation

Carbon Java does **not** require indentation. These two blocks are identical to the compiler:
Carbon Lang does **not** require indentation. These two blocks are identical to the compiler:

```
add item
Expand Down
4 changes: 2 additions & 2 deletions docs/language/02_logic_and_variables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Logic and Variables

This page covers how to make decisions, store information, and repeat things in Carbon Java.
This page covers how to make decisions, store information, and repeat things in Carbon Lang.

---

Expand Down Expand Up @@ -83,7 +83,7 @@ run (scripts/normal.cj)

### And — `anif`

Because Carbon Java doesn't use indentation for logic, "and" is written as `anif` on the next line:
Because Carbon Lang doesn't use indentation for logic, "and" is written as `anif` on the next line:

```
if (holding)
Expand Down
2 changes: 1 addition & 1 deletion docs/language/actions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Actions & Execution
# Carbon Lang Script — Actions & Execution

---

Expand Down
2 changes: 1 addition & 1 deletion docs/language/blocks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Block Types & Properties
# Carbon Lang Script — Block Types & Properties

---

Expand Down
2 changes: 1 addition & 1 deletion docs/language/events.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Events
# Carbon Lang Script — Events

Events are used with `on` inside any `add` block, or standalone in action scripts.

Expand Down
4 changes: 2 additions & 2 deletions docs/language/logic.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Logic, Conditions & Loops
# Carbon Lang Script — Logic, Conditions & Loops

---

Expand All @@ -25,7 +25,7 @@ run (normal.cj)
## `anif` — And If

Used when you need multiple conditions to all be true.
Because there is no indentation in Carbon Java, `anif` replaces chained `and` conditions.
Because there is no indentation in Carbon Lang, `anif` replaces chained `and` conditions.

```
if (holding)
Expand Down
2 changes: 1 addition & 1 deletion docs/language/recipes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Recipes
# Carbon Lang Script — Recipes

Recipe files live in `src/recipes/` and use a special simplified format.
They do not start with `carbonjava` — they are purely data files.
Expand Down
4 changes: 2 additions & 2 deletions docs/language/syntax.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Carbon Java Script — Core Syntax
# Carbon Lang Script — Core Syntax

## File Header

Every `.cj` file must begin with `carbonjava` on the very first line.
This identifies the file as a Carbon Java Script file.
This identifies the file as a Carbon Lang Script file.

```
carbonjava
Expand Down
2 changes: 1 addition & 1 deletion docs/language/variables.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Variables, Types & Persistent Data
# Carbon Lang Script — Variables, Types & Persistent Data

---

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/02_targets.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Targets Reference

Targets tell Carbon Java *who* an action applies to. They are used in `effect`, `damage`, `spawn`, `teleport`, and similar action lines.
Targets tell Carbon Lang *who* an action applies to. They are used in `effect`, `damage`, `spawn`, `teleport`, and similar action lines.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/structure/carbon-mod-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Carbon defaults to child injection when no parent/child split is specified.

| Type | Description |
|------|-------------|
| `"carbon"` | A standard Carbon Java Script mod. |
| `"carbon"` | A standard Carbon Lang Script mod. |
| `"allotrope"` | Injects Java into Carbon Loader via mixins. |
| `"fabric"` | A Fabric mod that uses carbon.mod.json for Carbon ecosystem compatibility. |

Expand Down
4 changes: 2 additions & 2 deletions docs/structure/folder-structure.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Carbon Java Script — Mod Folder Structure
# Carbon Lang Script — Mod Folder Structure

Carbon mods are distributed as `.zip` files. Carbon Lib unzips them at runtime
into a temp directory and loads them. No build step is required from the modder.
Expand All @@ -17,7 +17,7 @@ my_awesome_mod.zip
│ ├── models/ # Custom 3D models (.glb or .obj)
│ └── sounds/ # Audio files (.mp3, .ogg)
└── src/ # All Carbon Java Script logic
└── src/ # All Carbon Lang Script logic
├── definitions/ # Global registration
│ ├── mobs.cj # All "add mob" declarations
│ ├── blocks.cj # All "add block" declarations
Expand Down
Loading