Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CCPL for Visual Studio Code

Marketplace License: MIT Version

Syntax highlighting and editor support for CCPL — the Cool Compilable Programming Language, a Lua-like language that compiles straight to native executables through TinyCC.

This repository contains only the VS Code extension. The language implementation lives in a separate repository.

Features

  • Syntax highlighting for .ccpl files
    • keywords and control flow (if/elseif/else, while, repeat/until, for, return, break, continue)
    • declarations (var / variable, func, get)
    • builtins (say, hey, oh, tonumber, tostring, malloc/calloc/realloc/free)
    • native types (i8…i64, u8…u64, f32, f64, bool, char, ptr)
    • numbers (decimal, float, exponent, hex), strings with escapes, operators
  • Line comments (--) and block comments (--[[ ... ]])
  • Smart bracket and quote pairing
  • A custom icon and dark gallery banner

Install

From the Marketplace

Search for CCPL in the VS Code Extensions view, or run:

code --install-extension ccpl.ccpl

From a .vsix

code --install-extension ccpl-0.3.0.vsix

From source

git clone https://github.com/ccpl-lang/vscode-ccpl.git
cd vscode-ccpl
npm install
npx vsce package
code --install-extension ccpl-0.3.0.vsix

A taste of CCPL

-- hello world in CCPL
say("hello, world")

func add(a: i32, b: i32): i32
    return a + b
end

for i = 1, 3 do
    say("add", i, add(i, 10))
end

Related repositories

Project Description License
ccpl Compiler and language implementation GPL-3.0
ccpl-toolchain Ready-to-run Windows toolchain bundle GPL-3.0
vscode-ccpl This extension MIT

Contributing

Issues and pull requests are welcome. Please open an issue before starting a larger change. To add highlighting, edit syntaxes/ccpl.tmLanguage.json and test with the Developer: Inspect Editor Tokens and Scopes command.

License

Released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors