Metadata-Version: 2.4
Name: krash-lang
Version: 1.0.0
Summary: Krash Programming Language - An interpreted language with clear, readable syntax
Home-page: https://github.com/KAKUDEV-web/Krash
Author: Krash Community
Author-email: krash@example.com
Project-URL: Bug Reports, https://github.com/KAKUDEV-web/Krash/issues
Project-URL: Source, https://github.com/KAKUDEV-web/Krash
Project-URL: Documentation, https://github.com/KAKUDEV-web/Krash/blob/main/README.md
Keywords: programming language interpreter krash
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Interpreters
Classifier: Topic :: Education
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# Krash Programming Language v1.0

Krash is an interpreted programming language written in Python with clear, readable syntax and short code lines.

## Features

- **Readable Syntax** - Clean, intuitive syntax similar to Python
- **Strict Typing** - Type checking prevents subtle bugs
- **Built-in Libraries** - mathBasic, ArraysAndStrings, HTTPClient, FileUtils, JSONParser, DateUtils, Random
- **Format Strings** - Powerful string interpolation with `showf`
- **Error Handling** - Try/catch blocks for robust error handling
- **File I/O** - Built-in file reading and writing
- **HTTP Requests** - Make GET, POST, PUT, DELETE requests
- **JSON Support** - Parse and generate JSON data

## Installation

```bash
pip install krash-lang
```

## Quick Start

### Hello World

```krash
show "Hello, World!"
```

### Variables and Math

```krash
str name = "Alice"
int age = 28
showf "Name: {name}, Age: {age}"
```

### Arrays

```krash
int[] scores = [85, 92, 78, 95, 88]
showf "Total: {scores.length()} items"
showf "First: {scores[0]}"
```

### Functions

```krash
fxn>: add(int a, int b):
    givef "{a + b}"
<:

int result = add(10, 20)
showf "Result: {result}"
```

### Control Flow

```krash
int score = 85

if>: score >= 90:
    show "Grade: A"
<: elif>: score >= 80:
    show "Grade: B"
<: else>:
    show "Grade: C"
<:
```

### Dictionaries

```krash
mydict{} = {
    "name": "Alice",
    "age": 28
}

showf "Name: {mydict{"name"}}"
showf "Age: {mydict{"age"}}"
```

### Error Handling

```krash
try>:
    int x = int("not a number")
<: catch>: ValueError:
    show "Invalid number!"
<:
```

### File I/O

```krash
write>: "Hello, World!":
    .new("hello.txt")
<:

read>: ("hello.txt"):
    showf "Content: {read.getFirstLine()}"
<:
```

### HTTP Requests

```krash
#HTTPClient

try>:
    str response = HTTPClient.get("https://api.example.com/data")
    showf "Response: {response}"
<: catch>: NetworkError:
    show "Request failed"
<:
```

## Standard Libraries

| Library | Description |
|---------|-------------|
| `#mathBasic` | Basic arithmetic (add, subtract, multiply, divide) |
| `#ArraysAndStrings` | Array/string utilities (capitalize, reverse, join) |
| `#HTTPClient` | HTTP requests (get, post, put, delete, patch) |
| `#FileUtils` | File operations (exists, copy, rename, list) |
| `#JSONParser` | JSON parsing (parse, stringify, getString) |
| `#DateUtils` | Date/time (today, time, daysUntil, addDays) |
| `#Random` | Random generation (integer, float, boolean, item) |

## Running Programs

```bash
# Run a Krash file
krsh program.ksh

# Start interactive mode
krsh

# Show version
krsh --version

# Show help
krsh --help
```

## Language Syntax

### Comments

```krash
// Single line comment

/ Multi line comment
that spans multiple lines /
```

### Block Syntax

Krash uses `>:` and `<:` for code blocks:

```krash
if>: condition:
    // code block
<:
```

### Indentation

Krash requires **4-space indentation** inside blocks:

```krash
for>: int i = 0, i < 5, i++:
    showf "{i}"      // 4 spaces
<:
```

## License

MIT License

## Author

Krash Community
