Cheer Xiao
82f07e1ab1
Cleanup main package
2015-01-22 23:23:29 +01:00
Cheer Xiao
1369ae6a11
Implement "source" builtin
2015-01-22 23:19:27 +01:00
Cheer Xiao
7605eff82f
Add a Source method to Evaluator. Simplify the main package.
2015-01-22 23:15:54 +01:00
Cheer Xiao
b8a1dbc606
Implement the "=" builtin (well, by cheating)
2015-01-22 20:25:15 +01:00
Cheer Xiao
f76cc8854b
Exclude = from sigils.
2015-01-22 20:24:16 +01:00
Cheer Xiao
00ec2614bc
Terminology change: enclosed -> captured
2015-01-22 20:11:10 +01:00
Cheer Xiao
74e3db42c1
Typecheck "set" at runtime too
2015-01-22 19:22:20 +01:00
Cheer Xiao
a1454e42c1
Fix a fmt call with missing arguments
2015-01-22 19:08:05 +01:00
Cheer Xiao
3072e09d2f
Add static type information to the variable in runtime.
2015-01-22 19:06:24 +01:00
Cheer Xiao
e3cd67229d
Add type "any" to typenames
2015-01-22 18:42:32 +01:00
Cheer Xiao
9a224a46d6
Do something more sensible when terminal has 0 height.
...
This fixes issue #40 .
2015-01-22 00:33:01 +01:00
Cheer Xiao
dd2a47152c
Let channel output on terminal use Repr instead of String
2015-01-21 23:55:10 +01:00
Cheer Xiao
65e1e19846
Introduce Bool type and Value.Bool method.
...
The "if" builtin now uses the Value.Bool method to determine trueness.
2015-01-21 23:50:40 +01:00
Cheer Xiao
27a625387e
Use exitus type to represent exit status.
2015-01-21 23:43:30 +01:00
Cheer Xiao
3737a67d6c
Add $status and failure builtin
2015-01-21 22:37:29 +01:00
Cheer Xiao
ad37ece4e8
Fix statusOk
2015-01-21 22:35:36 +01:00
Cheer Xiao
4830d4818f
Introduce new type "exitus".
...
This type will be used to represent exit status. "Exitus" can be considered
as a blend of "exit" and "status", although it is actually Latin for
"outcome".
2015-01-21 22:31:12 +01:00
Cheer Xiao
50842ed840
Eliminate indirection of String
2015-01-21 22:12:29 +01:00
Cheer Xiao
6442dc1a13
Make Env a singleton and eliminate indirection
2015-01-21 22:08:55 +01:00
Cheer Xiao
310c2a0b35
Switch to travis (again)
2015-01-21 20:59:53 +01:00
Cheer Xiao
d7ca67f3fd
Import store package in main.go
...
This is needed to ensure that dependencies of the store package are installed
with `go get` so that `go test ./store` can be run.
2015-01-21 20:56:52 +01:00
Cheer Xiao
a50f643952
In builtin each and if, exhaust the StatusUpdate channel properly
2015-01-21 20:49:45 +01:00
Cheer Xiao
b8bd72c3ab
Implement builtin function "if"
2015-01-21 20:42:40 +01:00
Cheer Xiao
b0d041a8c2
Cosmetics
2015-01-21 20:36:41 +01:00
Cheer Xiao
d7c712244c
Fix streamTypes of "typeof" builtin
2015-01-21 20:35:00 +01:00
Cheer Xiao
14ae68daf8
Simplify StreamType
2015-01-21 20:33:02 +01:00
Cheer Xiao
5911d955a6
Implement new builtin "each"
2015-01-21 18:32:24 +01:00
Cheer Xiao
067c8ac75e
Add new builtin "unpack"
2015-01-21 18:21:02 +01:00
Cheer Xiao
e143c65087
Implement and test fn properly as a special form
2015-01-21 18:06:14 +01:00
Cheer Xiao
b3f7d6dd7e
Move cp.enclosed fiddling from compilePrimary to compileClosure
2015-01-21 18:00:47 +01:00
Cheer Xiao
b5f09cc8e3
Cleanups and refactors
2015-01-21 17:43:27 +01:00
Cheer Xiao
1c9aa72b67
Test scope shadowing
2015-01-20 22:20:56 +01:00
Cheer Xiao
6b316a79d4
Fix and test variable enclosure of closure
2015-01-20 21:54:44 +01:00
Cheer Xiao
29c05aaf04
Implement and test closure argument passing
...
The dollar is now required in the parameter list.
2015-01-20 21:48:31 +01:00
Cheer Xiao
11c10b7457
Add test case for channel capture
2015-01-20 21:33:01 +01:00
Cheer Xiao
a578fb1624
Add tests for {Chan Status}CapturePrimary
2015-01-20 21:27:21 +01:00
Cheer Xiao
c652fdcd9b
Add closures to parse_test.go
2015-01-20 21:03:35 +01:00
Cheer Xiao
590154a955
Item of type ItemError now stringifies to "error: " + value
2015-01-20 20:45:23 +01:00
Cheer Xiao
44f8e23189
Handle parsing of empty chunks properly
2015-01-20 20:32:44 +01:00
Cheer Xiao
1ed20259e9
Add a "title" attribute to ContextualError
2015-01-20 20:22:20 +01:00
Cheer Xiao
3720fea28b
Fix parsing of closure literals
2015-01-20 20:21:59 +01:00
Cheer Xiao
9cb7d48394
Replace the quote on screenshot with a wittier one
2015-01-20 17:59:55 +01:00
Cheer Xiao
450d98a4fa
Let Parser.unexpected report more detailed error
2015-01-20 14:24:38 +01:00
Cheer Xiao
69c4b2d6b5
Remove ClosureNode.Annotation
2015-01-20 14:18:41 +01:00
Cheer Xiao
369a3fb67e
Commands are now resolved dynamically.
...
Handling of the state of external commands is slightly improved.
2015-01-20 01:32:17 +01:00
Cheer Xiao
806f02074b
Minor refactor on variable resolution
2015-01-19 23:26:59 +01:00
Cheer Xiao
73eb217cbb
Update comment
2015-01-19 22:37:38 +01:00
Cheer Xiao
b6ff81693d
Implement typeRun.String, use it in static-typeof builtin special form
2015-01-19 22:26:45 +01:00
Cheer Xiao
9bdf81c31f
Implement Type.String, use it in typeof builtin
2015-01-19 22:22:31 +01:00
Cheer Xiao
142c0f6bca
Fix static type of Compound
2015-01-19 22:19:13 +01:00