A structured procedural language w/ a Lisp runtime / Rust ATProto bridge, to build a working TUI Bsky client
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Introduce fuller VS Code support for Superplan

+185 -35
+6
editors/vscode/superplan/.vscodeignore
··· 1 + .git/ 2 + .gitignore 3 + .vscode/ 4 + node_modules/ 5 + **/*.vsix 6 + README-assets/
+10
editors/vscode/superplan/CHANGELOG.md
··· 1 + # Changelog 2 + 3 + ## 0.0.2 4 + - improved syntax highlighting 5 + - added Superplan snippets 6 + - refined built-in and bridge function highlighting 7 + - standardized `.spl` extension support 8 + 9 + ## 0.0.1 10 + - initial VS Code language support
+50 -11
editors/vscode/superplan/README.md
··· 1 1 # Superplan Language Support 2 2 3 - Minimal VS Code language support for Superplan 3 + VS Code language support for **Superplan**. 4 + 5 + This extension provides: 6 + 7 + - syntax highlighting 8 + - comment support 9 + - bracket matching 10 + - snippets 11 + - `.spl` file association 12 + 13 + ## Language 14 + 15 + Superplan is a structured, procedural language inspired by early high-level languages and modernized for current systems experiments. 16 + 17 + Current source extension: 18 + 19 + - `.spl` 4 20 5 21 ## Features 6 22 7 - - Syntax highlighting 8 - - Comment support (`;`) 9 - - Bracket matching 10 - - String highlighting 11 - - Keyword/type/operator highlighting 23 + ### Syntax highlighting 24 + Highlights: 25 + 26 + - control keywords 27 + - types 28 + - booleans 29 + - built-in runtime functions 30 + - AT Proto bridge functions 31 + - procedure names 32 + - strings, numbers, comments, operators 12 33 13 - ## File extension 34 + ### Snippets 35 + Includes starter snippets for: 14 36 15 - Use `.spl` for Superplan source files. 37 + - program skeleton 38 + - procedure 39 + - `IF` 40 + - `WHILE` 41 + - `FOR` 16 42 17 43 ## Install locally 18 44 19 - From this folder: 45 + Open this folder in VS Code and press `F5` to launch an Extension Development Host. 20 46 21 - ```bash 22 - code --install-extension . 47 + Or package and install later with the VS Code extension tooling. 48 + 49 + ## Example 50 + 51 + ```superplan 52 + PROGRAM HELLO 53 + 54 + BEGIN 55 + WRITE("HELLO SUPERPLAN") 56 + END 57 + 58 + Notes: 59 + Superplan currently uses ; for line comments. 60 + This extension intentionally associates Superplan with .spl. 61 + GitHub Linguist does not currently support Superplan as a first-class language, so repository overrides should classify .spl as Text.
+24 -4
editors/vscode/superplan/package.json
··· 1 1 { 2 2 "name": "superplan-language", 3 3 "displayName": "Superplan Language Support", 4 - "description": "Syntax highlighting and language configuration for Superplan", 5 - "version": "0.0.1", 4 + "description": "Syntax highlighting, snippets, and editor support for Superplan", 5 + "version": "0.0.2", 6 6 "publisher": "formerlab", 7 + "license": "MIT", 7 8 "engines": { 8 9 "vscode": "^1.85.0" 9 10 }, 10 11 "categories": [ 11 12 "Programming Languages" 12 13 ], 14 + "keywords": [ 15 + "superplan", 16 + "language", 17 + "compiler", 18 + "historical languages", 19 + "algol", 20 + "plankalkul" 21 + ], 13 22 "contributes": { 14 23 "languages": [ 15 24 { 16 25 "id": "superplan", 17 - "aliases": ["Superplan", "superplan"], 18 - "extensions": [".spl"], 26 + "aliases": [ 27 + "Superplan", 28 + "superplan" 29 + ], 30 + "extensions": [ 31 + ".spl" 32 + ], 19 33 "configuration": "./language-configuration.json" 20 34 } 21 35 ], ··· 24 38 "language": "superplan", 25 39 "scopeName": "source.superplan", 26 40 "path": "./syntaxes/superplan.tmLanguage.json" 41 + } 42 + ], 43 + "snippets": [ 44 + { 45 + "language": "superplan", 46 + "path": "./snippets/superplan.code-snippets" 27 47 } 28 48 ] 29 49 }
+57
editors/vscode/superplan/snippets/superplan.code-snippets
··· 1 + { 2 + "Program template": { 3 + "prefix": "prog", 4 + "body": [ 5 + "PROGRAM ${1:NAME}", 6 + "", 7 + "BEGIN", 8 + " $0", 9 + "END" 10 + ], 11 + "description": "Superplan program skeleton" 12 + }, 13 + "Procedure": { 14 + "prefix": "proc", 15 + "body": [ 16 + "PROCEDURE ${1:NAME}(${2})", 17 + "BEGIN", 18 + " $0", 19 + "END" 20 + ], 21 + "description": "Superplan procedure block" 22 + }, 23 + "If statement": { 24 + "prefix": "if", 25 + "body": [ 26 + "IF ${1:COND} THEN", 27 + " $0", 28 + "END" 29 + ], 30 + "description": "Superplan IF block" 31 + }, 32 + "While statement": { 33 + "prefix": "while", 34 + "body": [ 35 + "WHILE ${1:COND} DO", 36 + " $0", 37 + "END" 38 + ], 39 + "description": "Superplan WHILE block" 40 + }, 41 + "For statement": { 42 + "prefix": "for", 43 + "body": [ 44 + "FOR ${1:I} = ${2:0} TO ${3:10} STEP ${4:1} DO", 45 + " $0", 46 + "END" 47 + ], 48 + "description": "Superplan FOR block" 49 + }, 50 + "Procedure call": { 51 + "prefix": "call", 52 + "body": [ 53 + "CALL ${1:NAME}(${2})" 54 + ], 55 + "description": "Superplan CALL statement" 56 + } 57 + }
+38 -20
editors/vscode/superplan/syntaxes/superplan.tmLanguage.json
··· 3 3 "scopeName": "source.superplan", 4 4 "patterns": [ 5 5 { "include": "#comments" }, 6 + { "include": "#strings" }, 6 7 { "include": "#keywords" }, 7 8 { "include": "#types" }, 8 9 { "include": "#booleans" }, 10 + { "include": "#builtins" }, 11 + { "include": "#bridgeBuiltins" }, 12 + { "include": "#declarationNames" }, 13 + { "include": "#functionCalls" }, 9 14 { "include": "#numbers" }, 10 - { "include": "#strings" }, 11 - { "include": "#procedures" }, 12 - { "include": "#functionCalls" }, 13 - { "include": "#identifiers" }, 14 - { "include": "#operators" } 15 + { "include": "#operators" }, 16 + { "include": "#identifiers" } 15 17 ], 16 18 "repository": { 17 19 "comments": { ··· 22 24 } 23 25 ] 24 26 }, 27 + "strings": { 28 + "name": "string.quoted.double.superplan", 29 + "begin": "\"", 30 + "end": "\"", 31 + "patterns": [ 32 + { 33 + "name": "constant.character.escape.superplan", 34 + "match": "\\\\[\\\\\"ntr]" 35 + } 36 + ] 37 + }, 25 38 "keywords": { 26 39 "patterns": [ 27 40 { ··· 46 59 } 47 60 ] 48 61 }, 49 - "numbers": { 62 + "builtins": { 50 63 "patterns": [ 51 64 { 52 - "name": "constant.numeric.integer.superplan", 53 - "match": "\\b[0-9]+\\b" 65 + "name": "support.function.builtin.superplan", 66 + "match": "\\b(WRITE|READLINE|JSON_PARSE|JSON_STRINGIFY|JSON_GET|JSON_INDEX|JSON_LEN|JSON_TYPE|JSON_STRING|JSON_NUMBER|JSON_BOOL|JSON_IS_NULL)\\b" 54 67 } 55 68 ] 56 69 }, 57 - "strings": { 58 - "name": "string.quoted.double.superplan", 59 - "begin": "\"", 60 - "end": "\"", 70 + "bridgeBuiltins": { 61 71 "patterns": [ 62 72 { 63 - "name": "constant.character.escape.superplan", 64 - "match": "\\\\[\\\\\"ntr]" 73 + "name": "support.function.bridge.superplan", 74 + "match": "\\b(ATP_LOGIN|ATP_TIMELINE|ATP_PROFILE|ATP_THREAD|ATP_POST|ATP_NOTIFICATIONS|ATP_WHOAMI)\\b" 65 75 } 66 76 ] 67 77 }, 68 - "procedures": { 78 + "declarationNames": { 69 79 "patterns": [ 70 80 { 71 - "name": "entity.name.function.superplan", 81 + "name": "entity.name.type.program.superplan", 72 82 "match": "(?<=\\bPROGRAM\\s)[A-Z_][A-Z0-9_]*\\b" 73 83 }, 74 84 { ··· 80 90 "functionCalls": { 81 91 "patterns": [ 82 92 { 83 - "name": "support.function.superplan", 93 + "name": "entity.name.function.call.superplan", 84 94 "match": "\\b[A-Z_][A-Z0-9_]*(?=\\()" 85 95 } 86 96 ] 87 97 }, 88 - "identifiers": { 98 + "numbers": { 89 99 "patterns": [ 90 100 { 91 - "name": "variable.other.superplan", 92 - "match": "\\b[A-Z_][A-Z0-9_]*\\b" 101 + "name": "constant.numeric.integer.superplan", 102 + "match": "\\b[0-9]+\\b" 93 103 } 94 104 ] 95 105 }, ··· 106 116 { 107 117 "name": "keyword.operator.arithmetic.superplan", 108 118 "match": "(\\+|-|\\*|/)" 119 + } 120 + ] 121 + }, 122 + "identifiers": { 123 + "patterns": [ 124 + { 125 + "name": "variable.other.superplan", 126 + "match": "\\b[A-Z_][A-Z0-9_]*\\b" 109 127 } 110 128 ] 111 129 }