Skip to content
Novus Examples

Source code

The source-code category is a syntax-highlighting, linting, and parser fixture set: one idiomatic hello-world plus one realistic snippet in each of sixteen languages, all original and documented. HTML, CSS, JavaScript, and TypeScript (shipped as .mts to sidestep the MPEG-TS .ts collision) cover the web front-end; Python, Ruby, PHP, and Shell the scripting side; Java, Kotlin, Swift, Go, and Rust the application languages; C and C++ the systems layer; and SQL the database. Each hello-world is the minimal correct program for that language, and each snippet exercises the constructs a highlighter or parser actually has to get right — comments and doc-comments, string escapes and interpolation, numeric literals, functions, classes or structs, generics, enums, pattern matching, and error handling. Everything opens in the in-browser editor, previews inline as text, and is free to copy. Use these to test syntax highlighters, tree-sitter and language grammars, linters and formatters, code editors, diff viewers, and language detection — against short, known-correct source rather than a scraped repository.

C

C++

Css

Go

HTML

Java

JavaScript

Kotlin

PHP

Python

Ruby

Rust

Shell

Sql

Swift

TypeScript