Skip to main content

Sora Watermark Remover - Allows you to remove the watermark from Sora videos.Try Now

CurateClick

tsplay.dev favicon

Toc

Toc 是一个使用 TypeScript 类型系统实现的 C 风格语言解释器,支持动态类型、变量、表达式、控制语句和函数闭包等特性。

Check out Toc on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

两年前学习 TypeScript 类型体操时,个人的终极体操,并编写了介绍长文给初学者:类型体操之实现一个类C风格语言的解释器下面是实现效果演示的动图:demo实现的语言叫 Toc (点击在线体验). 它是 C 风格语法,接近 js。动态类型,基础类型有数字、布尔、字符串和 null,支持变量,表达式,块语句,if-else 条件语句,for 循环语句,函数。且函数是一等公民,可以传入传出,支持闭包。更详细的语法,可以参见 Toc Grammar Spec。文章比较长,主要介绍了:1. ts 的类型系统是怎样的函数式语言?2. 如何实现 Toc 解释器?文章介绍的很详细,其中为了照顾没有编译器基础的,还写了一个 ts 版本(不使用类型系统,直接使用 ts 语言,额,也可以说用 js 实现的)的做对照。

Latest Weekly Picks

Impromptu Speech Topics & Timer

Seedance 2.0: Multimodal AI video creator. Precisely direct characters and cameras to create production-ready, multi-shot cinematic stories in one click.

valrequest.net favicon
Weekly Pick

Turn Feelings Into Words

ValRequest

One‑stop AI video creation suite for image‑to‑video and more.

banana-ai.org favicon
Weekly Pick

Nano Banana AI is an AI photo tool for image generation and editing, enabling fast text-prompt edits, style transformations, and photorealistic results.

Nano Banana AI

Try Different Hairstyles Instantly

seedance2.ai favicon
Weekly Pick

Seedance 2 Delivers High Fidelity Motion and Audio Sync

Seedance 2
nanobananaimg.com favicon
Weekly Pick

Nano Banana AI Image Generator for Professional Image Creation with Nano Banana Pro Models

Nano Banana