Qi Xiao
a6859b2e77
edit: complete new form and new arg
2016-01-26 20:26:44 +00:00
Qi Xiao
5e410a733f
fix - builtin
2016-01-26 20:59:34 +01:00
Qi Xiao
1b93fcd988
eval: builtin revamps
2016-01-26 19:17:28 +01:00
Qi Xiao
c3c75bf67e
eval: remove BuiltinFnNames
2016-01-26 18:02:50 +01:00
Qi Xiao
a48fab1ed8
eval: builtin true is synonym with :
2016-01-26 17:49:46 +01:00
Qi Xiao
e763f70226
builtins {print,feed}chan -> {into,from}-lines; parse-json -> from-json
2016-01-26 17:48:41 +01:00
Qi Xiao
76c1c97d46
expose eval.fnPrefix; update docstring for fn
2016-01-26 17:42:37 +01:00
Qi Xiao
37686bce82
edit: complete fn- functions as commands
2016-01-26 17:38:59 +01:00
Qi Xiao
18b6e705c9
edit: color builtin specials correctly
2016-01-26 17:35:43 +01:00
Qi Xiao
9096d71704
edit: remove a superfluous line
2016-01-26 17:27:50 +01:00
Qi Xiao
982ee6cf09
edit: simplify completion
2016-01-26 17:25:00 +01:00
Qi Xiao
e238cdeb4f
edit: refactor completers
2016-01-26 16:27:41 +01:00
Qi Xiao
8ac6dce0e4
parse: make backup after a read of EOF behave correctly
...
This is done by introducing an "overEOF" count, so that when rd.next() == EOF,
rd.backup() does nothing. This behavior is needed for some incomplete inputs.
2016-01-26 14:54:24 +01:00
Qi Xiao
2eaa8fde6b
edit: complete variable
2016-01-26 00:46:46 +01:00
Qi Xiao
58bc615caa
expose Evaler.global via .Global
2016-01-26 00:41:52 +01:00
Qi Xiao
30f07d9e7f
edit: color and complete external command names
2016-01-26 00:31:45 +01:00
Qi Xiao
673c2438d2
eval: Factor out DontSearch
2016-01-26 00:26:49 +01:00
Qi Xiao
ad73f297c2
eval: move Evaler.Search to separate file; expose isExecutable
2016-01-26 00:04:54 +01:00
Qi Xiao
a65ff31b29
eval: expose Evaler.search
2016-01-25 23:57:22 +01:00
Qi Xiao
e2292b9680
eval: there is no builtin: namespace anymore.
2016-01-25 23:53:40 +01:00
Qi Xiao
743185f6f3
eval: make lexical scoping less broken
2016-01-25 23:53:17 +01:00
Qi Xiao
0e1f1fe408
eval: add a new failing test case on lexical scoping
2016-01-25 23:28:24 +01:00
Qi Xiao
5c4de3302a
add semantic coloring of variables
2016-01-25 23:09:47 +01:00
Qi Xiao
4a6880534c
edit: fix a panic in nodeutil.go
2016-01-25 23:05:40 +01:00
Qi Xiao
c0d783996e
edit: terminate completion early if current token has no node
2016-01-25 23:01:31 +01:00
Qi Xiao
ea2b7e8b92
edit: move utils for evaluation of nodes into nodeutil.go
2016-01-25 22:47:43 +01:00
Qi Xiao
52d3565af1
edit: support coloring of Sep's
2016-01-25 22:43:39 +01:00
Qi Xiao
065549965d
edit: Token now has an MoreStyle field
2016-01-25 22:35:19 +01:00
Qi Xiao
13d914f9a8
edit: bs *editorState -> es *editorState
2016-01-25 22:19:44 +01:00
Qi Xiao
cca6d75c36
Store a pointer to eval.Evaler in edit.Editor
2016-01-25 22:14:12 +01:00
Qi Xiao
5c64fa16e0
parse: support comments
2016-01-25 21:57:31 +01:00
Qi Xiao
c3fbfea7b1
edit: change styling of mode
2016-01-25 17:54:18 +01:00
Qi Xiao
a029e7bb56
edit: small refactor on completers
2016-01-25 15:00:02 +01:00
Qi Xiao
25d4cc9737
edit: Fix file completion
2016-01-24 23:12:11 +01:00
Qi Xiao
1ab8db9061
edit: Separate the logics of finding completions into completers.go
2016-01-24 22:59:22 +01:00
Qi Xiao
aedf2120f8
parse: Always return whatever has been parsed
2016-01-24 19:19:44 +01:00
Qi Xiao
fdaff87710
edit: fix isFormHead
2016-01-24 19:11:03 +01:00
Qi Xiao
4b2fbce4bc
parse: Don't expose Node.N()
2016-01-24 19:04:15 +01:00
Qi Xiao
9eee803638
eval: mention command name in "command not found" message
2016-01-24 18:35:14 +01:00
Qi Xiao
233a8f4b07
parse-ng -> parse
2016-01-24 18:15:21 +01:00
Qi Xiao
4f827d4c05
Remove parse
2016-01-24 18:15:20 +01:00
Qi Xiao
5e96d98c54
edit: use parse-ng
2016-01-24 18:15:17 +01:00
Qi Xiao
3bcbd92145
parse-ng: Set Sep.SourceText correctly
2016-01-24 18:15:17 +01:00
Qi Xiao
384a5e5381
parse-ng: Expose Node.n
2016-01-24 18:15:16 +01:00
Qi Xiao
3f320f1356
eval: Add a test for closure behavior
2016-01-24 18:15:16 +01:00
Qi Xiao
d0de8606cf
eval: test exitus when tt.wantExitus==nil
2016-01-24 18:15:16 +01:00
Qi Xiao
a3ad98875a
eval: Type is now just an enum; small fixes
2016-01-24 18:15:15 +01:00
Qi Xiao
db5c34ec61
eval: var.go -> variable.go
2016-01-24 18:15:15 +01:00
Qi Xiao
66d3c84fad
eval: remove code related to static type
2016-01-24 18:15:14 +01:00
Qi Xiao
b88b9a0793
eval: fn is back
2016-01-24 18:15:14 +01:00