Compare commits
2 Commits
8c9d787868
...
d9ba328e74
Author | SHA1 | Date | |
---|---|---|---|
|
d9ba328e74 | ||
|
cf783fe597 |
22
CLAUDE.md
Normal file
22
CLAUDE.md
Normal file
@ -0,0 +1,22 @@
|
||||
# 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,7 +3,15 @@ name = "schala"
|
||||
version = "0.1.0"
|
||||
authors = ["greg <greg@everydayimshuflin.com>"]
|
||||
edition = "2021"
|
||||
description = "Schala programming language compiler"
|
||||
|
||||
[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,4 +1,16 @@
|
||||
# Schala
|
||||
|
||||
No-runtime-value-error-language
|
||||
A strongly-typed, pure functional language with imperative syntax affordances.
|
||||
|
||||
A language wth a largely-python-like where there are no value errors. Can call null like a function
|
||||
## Key Features
|
||||
- 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.
|
34
src/main.rs
34
src/main.rs
@ -1,3 +1,33 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
/*
|
||||
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() {
|
||||
env_logger::init();
|
||||
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