Skip to content

mindaaaa/mint

Repository files navigation

header

A soft-spoken language for expressing life, feeling, and flow.
You don't write code in MINT. You whisper it.

배너

🌼 What is MINT?

MINT는 감성적이고 생명력 있는 코딩 경험을 추구하는 커스텀 언어입니다.
코드는 자연처럼 피어나야 한다는 철학 아래, 시적이고 유려한 문법을 지향합니다.

You don't write code in MINT.
You whisper it.


✦ 주요 특징

  • plant, bloom, sparkle 같은 생명과 감정을 담은 키워드
  • 감정, 흐름, 생명감을 중심으로 구성된 코드 스타일
  • 읽고 쓰기 쉬운 구조, 문장처럼 흐르는 문법

🚀 Try it Online

웹 플레이그라운드에서 바로 체험해보세요!

👉 https://mint-woad.vercel.app/

웹 브라우저에서 MINT 코드를 작성하고 실행할 수 있습니다.
터미널 아이콘을 더블클릭하여 시작하세요!

Note

웹 플레이그라운드 사용법과 명령어 가이드는 Web Playground Guide 위키에서 확인하세요.


🪴 Quick Start

웹에서 시작하기 (추천)

  1. 웹 플레이그라운드 접속
  2. 터미널 아이콘 더블클릭
  3. mint "sparkle \"hello, mint!\"" 입력하여 실행

Tip

웹 플레이그라운드에서는 설치 없이 바로 MINT를 체험할 수 있습니다.
자세한 사용법과 예제는 Web Playground Guide 위키를 참고하세요.

CLI로 시작하기

  1. 설치
    npm install
  2. 빠른 실행
    npm start -- run examples/hello.mint
    🌿 Result
      hello, mint!
    
  3. 테스트
    npm test

CLI 사용법

  • mint run <file.mint>: 지정한 스크립트를 실행합니다.
  • mint version: CLI 버전을 출력합니다.

Tip

로컬 개발 환경에서는 먼저 npm run build를 수행한 뒤
npx mint run examples/hello.mint처럼 실행할 수 있습니다.
npm start -- <command> 형태로도 동일하게 사용할 수 있습니다.

예제 스크립트

  • examples/hello.mint: 간단한 인사 출력
  • examples/conditional.mint: 조건문과 반복문 흐름
  • examples/functions.mint: 함수 선언과 호출
  • examples/errors.mint: 런타임 에러 데모

오류 예시

mint run examples/errors.mint
🔥 Runtime Error
  at examples/errors.mint
  Undefined identifier "undefinedFeeling".
    details:
    {
      "name": "undefinedFeeling"
    }
  Hint: 실행 중인 값과 타입이 예상과 일치하는지 확인하세요.

Note

렉서/파서 에러를 포함한 더 많은 예시와 상세한 가이드는 위키에서 확인할 수 있습니다.


문법 예시

plant feeling = "gentle"
plant season = 0

breeze (feeling == "gentle") softly {
  sparkle "the breeze whispers softly"
}

bloom (season < 3) softly {
  sparkle season
  plant season = season + 1
}

petal greet(name) {
  sparkle "hello, " + name
  gift "🌼"
}

연산자

연산자 설명 예시
+ 덧셈 또는 문자열 결합 plant total = 1 + 2, sparkle "hello, " + name
- 뺄셈 plant diff = right - left
* 곱셈 plant area = width * height
/ 나눗셈 plant half = value / 2
== 동등 비교 breeze (answer == 42) softly { ... }
< 미만 비교 bloom (count < limit) softly { ... }

Warning

타입이 맞지 않는 연산을 시도하면 평가기에서 런타임 에러를 발생시킵니다.


키워드

키워드 기능 의미
plant 변수 선언 값을 심듯이 다룹니다
sparkle 출력 감정을 담아, 빛나는 순간을 표현합니다
breeze 조건문 조건이 바람처럼 스치면 반응합니다
bloom 반복문 무언가가 자연스럽게 피어나듯 반복됩니다
petal 함수 선언 꽃잎처럼 열리고 닫히며 기능을 만듭니다
gift 반환 값을 건넵니다. 마치 선물을 전하듯
softly 연결어 흐름을 잇는 말입니다

기술 스택

TypeScript Jest Node.js CLI


더 알아보기

자세한 문서와 예제는 위키에서 확인하세요.


🌿 Status

Season 0.1 — Sunlight Drift
Currently in development


👩‍💻 개발자

Made with 🌼 by @mindaaaa


by you, for expression, emotion, and elegance.

About

속삭이듯 피어나는 언어, MINT🌻

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published