Compare commits
No commits in common. "d9ba328e7443b4aa77376790a84531f5568dada7" and "8c9d787868c691b1fa90902b197e87d6bb5dfa23" have entirely different histories.
d9ba328e74
...
8c9d787868
22
CLAUDE.md
22
CLAUDE.md
@ -1,22 +0,0 @@
|
|||||||
# Schala Development Guide
|
|
||||||
|
|
||||||
## Build & Test Commands
|
|
||||||
- Build: `cargo build`
|
|
||||||
- Run: `cargo run`
|
|
||||||
- Release build: `cargo build --release`
|
|
||||||
- Test all: `cargo test`
|
|
||||||
- Test single: `cargo test test_name`
|
|
||||||
- Lint: `cargo clippy`
|
|
||||||
- Format: `cargo fmt`
|
|
||||||
|
|
||||||
## Code Style Guidelines
|
|
||||||
- **Edition**: Rust 2021
|
|
||||||
- **Naming**: Snake case for functions/variables, CamelCase for types/traits
|
|
||||||
- **Imports**: Group standard library, external crates, then internal modules
|
|
||||||
- **Error Handling**: Use Result type for recoverable errors, panic for unrecoverable ones
|
|
||||||
- **Formatting**: Follow rustfmt defaults (4-space indentation)
|
|
||||||
- **Comments**: Document public APIs with /// comments
|
|
||||||
- **Types**: Prefer strong typing, avoid `unwrap()` in production code
|
|
||||||
|
|
||||||
## Project Info
|
|
||||||
- Language implementation with Python-like syntax but no runtime value errors
|
|
1738
Cargo.lock
generated
1738
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -3,15 +3,7 @@ name = "schala"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["greg <greg@everydayimshuflin.com>"]
|
authors = ["greg <greg@everydayimshuflin.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Schala programming language compiler"
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.4", features = ["derive"] }
|
|
||||||
log = "0.4"
|
|
||||||
env_logger = "0.10"
|
|
||||||
wasmtime = "31.0"
|
|
||||||
codespan-reporting = "0.11"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
insta = "1.34"
|
|
||||||
|
|
||||||
|
16
README
16
README
@ -1,16 +1,4 @@
|
|||||||
# Schala
|
|
||||||
|
|
||||||
A strongly-typed, pure functional language with imperative syntax affordances.
|
No-runtime-value-error-language
|
||||||
|
|
||||||
## Key Features
|
A language wth a largely-python-like where there are no value errors. Can call null like a function
|
||||||
- Pure functional core with imperative syntax sugar
|
|
||||||
- Strong static typing system
|
|
||||||
- Curly-brace syntax (no significant whitespace)
|
|
||||||
- Rust-style manual memory management without GC
|
|
||||||
- WebAssembly compilation target (with plans for native targets)
|
|
||||||
|
|
||||||
## Design Philosophy
|
|
||||||
Schala aims to combine the safety and reasoning benefits of functional programming with familiar syntax for developers from imperative backgrounds. The language prioritizes compile-time checks to eliminate runtime value errors.
|
|
||||||
|
|
||||||
## Project Status
|
|
||||||
Early experimental development.
|
|
||||||
|
32
src/main.rs
32
src/main.rs
@ -1,33 +1,3 @@
|
|||||||
/*
|
|
||||||
mod lexer;
|
|
||||||
mod parser;
|
|
||||||
mod ast;
|
|
||||||
mod typechecker;
|
|
||||||
mod codegen;
|
|
||||||
*/
|
|
||||||
mod error;
|
|
||||||
|
|
||||||
use clap::Parser;
|
|
||||||
use log::{info, error};
|
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
|
||||||
#[command(author, version, about, long_about = None)]
|
|
||||||
struct Args {
|
|
||||||
/// Source file to compile
|
|
||||||
#[arg(required = true)]
|
|
||||||
input_file: String,
|
|
||||||
|
|
||||||
/// Output file path
|
|
||||||
#[arg(short, long)]
|
|
||||||
output: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
env_logger::init();
|
println!("Hello, world!");
|
||||||
let args = Args::parse();
|
|
||||||
|
|
||||||
info!("Compiling {}...", args.input_file);
|
|
||||||
|
|
||||||
println!("Schala compiler initialized");
|
|
||||||
// TODO: Implement compilation pipeline
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user