tcl#
Tcl (Tool Command Language)
In this module:#
Language |
Name (Aliases) |
Description |
Filename(s) |
Mime Type(s) |
---|---|---|---|---|
Tcl |
Tool command language |
|
|
Example:#
Root lexicon Tcl.root
and text:
Text rendered using default theme
#! /bin/env tclsh # Tcl example from the tcl-lang wiki package require Tk button .b -text "Push Me" -command {tk_messageBox -message "hello, world"} pack .b
Result tree:
<Context Tcl.root at 0-157 (16 children)>
├╴<Token '#! /bin/env tclsh' at 0:17 (Comment.Special)>
├╴<Token '#' at 18:19 (Comment)>
├╴<Context Tcl.comment at 19-54 (1 child)>
│ ╰╴<Token ' Tcl example...tcl-lang wiki' at 19:54 (Comment)>
├╴<Token 'package' at 56:63 (Keyword)>
├╴<Token 'require' at 64:71 (Text.Word)>
├╴<Token 'Tk' at 72:74 (Text.Word)>
├╴<Token 'button' at 75:81 (Name.Command)>
├╴<Token '.b' at 82:84 (Text.Word)>
├╴<Token '-text' at 85:90 (Text.Word)>
├╴<Token '"' at 91:92 (Literal.String)>
├╴<Context Tcl.quoted at 92-100 (2 children)>
│ ├╴<Token 'Push Me' at 92:99 (Literal.String)>
│ ╰╴<Token '"' at 99:100 (Literal.String)>
├╴<Token '-command' at 101:109 (Text.Word)>
├╴<Token '{' at 110:111 (Delimiter.Bracket)>
├╴<Context Tcl.braced at 111-149 (5 children)>
│ ├╴<Token 'tk_messageBox' at 111:124 (Name.Command)>
│ ├╴<Token '-message' at 125:133 (Text.Word)>
│ ├╴<Token '"' at 134:135 (Literal.String)>
│ ├╴<Context Tcl.quoted at 135-148 (2 children)>
│ │ ├╴<Token 'hello, world' at 135:147 (Literal.String)>
│ │ ╰╴<Token '"' at 147:148 (Literal.String)>
│ ╰╴<Token '}' at 148:149 (Delimiter.Bracket)>
├╴<Token 'pack' at 150:154 (Name.Command)>
╰╴<Token '.b' at 155:157 (Text.Word)>