Socket
Book a DemoInstallSign in
Socket

@sourcebot/codemirror-lang-tcl

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sourcebot/codemirror-lang-tcl

CodeMirror 6 language extension for Tcl

Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
232
-7.94%
Maintainers
2
Weekly downloads
 
Created
Source

CodeMirror Tcl Language Support

A CodeMirror 6 extension that provides Tcl syntax highlighting and language support with comprehensive procedure parsing.

Usage

import { EditorState } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { tcl } from 'codemirror-lang-tcl';
import { basicSetup } from 'codemirror';

new EditorView({
  state: EditorState.create({
    doc: `# Tcl procedure example
proc greet {name} {
    puts "Hello, $name!"
    return "Greeting sent to $name"
}

# Call the procedure
set result [greet "World"]
puts $result`,
    extensions: [basicSetup, tcl()],
  }),
  parent: document.querySelector('#editor'),
});

Development and Testing

After making changes to the grammer, run yarn build-grammar && yarn build to generate the parser.

Use the dump-ast.js script to dump the AST of a file to the console. Example:

node dump-ast.js test/file-processing-test.tcl

Keywords

codemirror

FAQs

Package last updated on 21 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts