Categorygithub.com/yak-labs/chirp-lang
modulepackage
0.0.0-20210218005624-0bd41fd3094c
Repository: https://github.com/yak-labs/chirp-lang.git
Documentation: pkg.go.dev

# README

Chirp

Chirp is a dynamic language inspired by Tcl_ and written in Go_.

.. image:: https://drone.io/github.com/yak-labs/chirp-lang/status.png :alt: Build Status :target: https://drone.io/github.com/yak-labs/chirp-lang/latest :width: 80 :height: 18

Building Chirp

First, you'll need to download and install Git_. Once you have Git installed, make sure that the git command is available from the command line. If not, you'll need to add it to your PATH environment variable.

Next, you'll need to download and install Go_. Once it's installed, you'll need to create a workspace and set your GOPATH environment variable to your workspace folder. The Go documentation contains a great page explaining the details on setting up your workspace titled, How to Write Go Code. There is also a nice screencast available as well.

Once you've setup your workspace, open up a command line to your workspace folder and run the following::

go get github.com/yak-labs/chirp-lang
cd src/github.com/yak-labs/chirp-lang/chirp
go install

This will fetch the Chirp source code, ensure you're on the master branch, and build the command line executable to run Chirp code. If you've added GOPATH/bin to your PATH, you should now be able to run chrip from your command line.

.. _Tcl: http://tcl.tk/ .. _Go: http://golang.org/ .. _Git: http://git-scm.com/ .. _How to Write Go Code: http://golang.org/doc/code.html .. _screencast: http://youtu.be/XCsL89YtqCs

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Simple LevelDB Key-Value storage for chirp.
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
ApplyToReflectedValue applies args, starting at i, to terpValue t.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ArgDash2v expects args to be (1) dash arguments (2) two required args (3) possibly some optional args.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HtCat catenates its arguments, converting each to HTML if it is not already HTML.
No description provided by the author
No description provided by the author
HtRaw trusts its input string is proper HTML, and casts it to HTML.
No description provided by the author
Initial capital letter for a variable means Global.
Initial capital letter for a variable means local.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Must takes 2 T values, and compares their Show()s.
MustA takes Any 2 values, and compares their Repr()s.
MustB takes two bytes.
MustSp takes Any 2 values, and compares their Repr()s, without spaces.
MustST takes a string and a T.
No description provided by the author
No description provided by the author
NewInterpreter() makes a new full interpreter.
No description provided by the author
NewSafeInterpreter() makes a new safe interpreter.
No description provided by the author
No description provided by the author
Returns next command, or else nil.
Parse nested curlies, returning contents.
Parse a variable name after a '$', returning *PPart.
Parse the Key for a Dollar with Parens, e.g.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Parse Square Bracketed subcommand, returning result and new position.
Parse a word, returning result and new position.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RemoveHeadDashArgs removes dash args from argv (only if they are QuickString), returning the dash args and modified argv.
No description provided by the author
Quick internal logging function that needs no Frame.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SortListByString is used by smilax-web/db.
No description provided by the author
No description provided by the author
Tag takes a HTML tag name, a slice of attr keys and values (stride is 2), and a body for the tag.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

Does not need substitions (backslash subs aready done).
No description provided by the author
No description provided by the author
$x, variable subs without index.
$x(...), variable subs with index.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
[...], subcommand eval and replace.
No description provided by the author
&&.
||.
end of string.
{*}$.
{*}[.
No description provided by the author
No description provided by the author
==.
No description provided by the author
No description provided by the author
No description provided by the author
Non-Ascii or not special.
<<.
>>.
eq.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
New in chirp; not in Tcl.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Safes are builtin commands that safe subinterps can call.
TODO: Global Prefix WILL BREAK WITH goROUTINES.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Unsafes are commands that only the trusted, toplevel terp can call.
No description provided by the author

# Structs

CmdNode makes a singly-linked-list of commands at different mixin levels, highest level first.
No description provided by the author
No description provided by the author
Either Bad or Good value.
No description provided by the author
Frame is a local variable frame.
No description provided by the author
Global holds the global state of an interpreter, mainly the Commands and global variables.
Jump structs are panicked for return, break, and continue.
No description provided by the author
Macros (for now) are not defined by mixins; they must be global.
Opaque is a new idea for things like credentials.
One command made of one or more words.
An expr command.
No description provided by the author
Any piece of tcl code, a sequence of commands.
One words, composed of parts that may require substitions.
No description provided by the author
Slot stores a variable value.
No description provided by the author
UpSlot forwards a variable to another variable.
No description provided by the author

# Interfaces

TODO: This interface could replace Command, or could Command replace this interface?.
Loc is protocol for a variable location.
No description provided by the author
T is an interface to any Tcl value.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HTML contains properly formatted & escaped HTML.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StatusCode are the same integers as Tcl/C uses for return, break, and continue.
No description provided by the author
No description provided by the author