About TSL

Small, Simple, Predictable — Compiles to JavaScript

What is TSL?

TSL (Time Script Language) คือภาษาโปรแกรมขนาดเล็กที่ออกแบบมาเพื่อเขียนง่าย อ่านง่าย และ transpile เป็น JavaScript ใช้ indentation เป็น block เหมือน Python แต่ไม่ใช่ Python

เป้าหมาย: ไม่ใช่การสร้างภาษา general-purpose ขนาดใหญ่ แต่เป็นภาษาเล็กที่ถูกต้อง คาดเดาได้ และง่ายต่อการ compile

Design Goals

  • Simple syntax — colon (:) และ indentation สำหรับ block
  • Full compiler pipeline — Lexer → Parser → AST → Validator → Generator
  • JavaScript backend — generate clean, readable, valid JavaScript
  • Deterministic output — same source always produces the same JavaScript
  • No VM, no bytecode, no JIT — compile ตรงเป็น JavaScript
  • Small and predictable

Project Stats

1.0.0

Version

100+

Examples

8

Test Suites

5

Error Types

Compiler Pipeline

TSL Source
Lexer
Parser
AST
Validator
Generator
JavaScript

Error System

Category Class Pipeline Stage
Lexer Error LexerError Tokenization
Parser Error ParserError Parsing
Semantic Error ValidationError Validation
Generator Error GeneratorError Code Generation
Runtime Error RuntimeError Execution

Out of Scope (v1.0)

  • Classes, inheritance, interfaces
  • Modules, packages
  • Static typing
  • Garbage collector, VM, bytecode
  • JIT compilation, native compilation
  • Async, threads, coroutines
  • Pattern matching, destructuring

License

TSL ปล่อยภายใต้ GPL-3.0 License