Notch Language
Full language support for the Notch programming language (.notch files), including syntax highlighting, error detection, IntelliSense, and more.
Features
Syntax Highlighting
Keywords, types, identifiers, numbers, operators, and comments are all coloured automatically when you open a .notch file.
| Token |
Examples |
| Keywords |
notnot, not, notifh, notelseh, notwhileh, ch |
| Types |
notinth, no |
| Identifiers |
notah, notfibh |
| Numbers |
0, 42 |
| Comments |
yes this is a comment |
Error Detection
Errors appear as red underlines with a message as you type. Three phases are checked:
Lexical — unrecognised characters that are not part of the language.
Syntax — structural mistakes:
- Missing
nt at the end of a statement
- Missing
{ or } around a block
- Missing
) or ( around a condition or parameter list
- Wrong token where a keyword or identifier was expected
Semantic — logical mistakes:
| Error | Example |
|---|---|
| Undeclared variable | Using notah before not notinth notah |
| Redeclared variable | Two not notinth notah in the same function |
| Uninitialized variable | Using a variable declared without = value |
| Undeclared function | Calling notfakeh ) ( that was never defined |
| Redeclared function | Two notnot blocks with the same name |
| Wrong argument count | Passing 2 args to a function that takes 1 |
| Division by zero | notah / 0 |
| Return from void | ch 5 nt inside a no function |
| Missing return value | ch nt inside a notinth function |
Snippets
Type a prefix and press Tab to expand a full template.
| Prefix |
Expands to |
var |
Variable declaration with initializer |
varnoinit |
Variable declaration without initializer |
func |
Function declaration |
funcvoid |
Void function with no parameters |
main |
Main function |
if |
If statement |
ifelse |
If-else statement |
while |
While loop |
ch |
Return with value |
chvoid |
Return from void function |
yes |
Line comment |
Hover over any identifier to see its details.
- Functions — signature, return type, and number of parameters.
- Variables — declared type, line of declaration, and whether it has been initialized.
Auto-complete (IntelliSense)
Press Ctrl+Space inside a .notch file to get suggestions:
- All functions defined in the file, with a ready-to-use call snippet (parameters pre-filled as tab stops).
- All variables declared in the current function scope.
Go to Definition
Ctrl+Click (or press F12) on any variable or function name to jump to where it was declared.
Document Outline
The OUTLINE panel in the left sidebar lists all functions in the file with their return type and parameter count. Click any entry to jump to that function.
Press Shift+Alt+F to auto-format the entire file:
- Each statement is placed on its own line.
{ stays on the same line as the opening keyword.
} is placed on its own dedented line.
} notelseh { stays on one line.
- Consistent spacing between all tokens.
Language Quick Reference
yes This is a comment
notnot notinth notadderh ) notinth notah . notinth notbh ( {
ch notah + notbh nt
}
notinth notch ) ( {
not notinth notresulth = notadderh ) 3 . 4 ( nt
notifh ) notresulth > 5 ( {
not notinth notxh = 10 nt
} notelseh {
not notinth notxh = 0 nt
}
notwhileh ) notresulth > 0 ( {
notresulth = notresulth - 1 nt
}
ch 0 nt
}