Commit Graph

192 Commits

Author SHA1 Message Date
Qi Xiao
74ae20cb8e parse: Fix for last commit. 2016-02-06 23:29:38 +01:00
Qi Xiao
0ca923b38c parse: Put the cutset in parser. 2016-02-06 23:17:57 +01:00
Qi Xiao
015def2d01 Cosmetics. 2016-02-06 17:13:53 +01:00
Qi Xiao
d7bd90e89e parse: Add tests against error reporting. 2016-02-06 13:51:12 +01:00
Qi Xiao
954c75e16e parse_test.go: Top down; comments. 2016-02-06 13:43:28 +01:00
Qi Xiao
4b7746e95a Fix test cases. 2016-02-06 00:43:51 +01:00
Qi Xiao
c5c5a7ddcd Fix parsing of assignment forms and the = builtin. 2016-02-06 00:43:29 +01:00
Qi Xiao
ddb7396046 Highlight compiling errors.
This fixes #64.
2016-02-05 23:25:13 +00:00
Qi Xiao
5c8a8d5eec Make parse report all errors. 2016-02-06 00:08:39 +01:00
Qi Xiao
af9ca8cd14 parse: Order pprint.go top-down; expose pprint{AST,ParseTree} 2016-02-05 23:13:28 +01:00
Qi Xiao
36578d2203 parse: Reorganize parse.go in top-down order. 2016-02-05 23:04:39 +01:00
Qi Xiao
3e0dc9c57b parse and compile argumentless lambdas 2016-02-05 01:04:52 +01:00
Qi Xiao
6a5f6bf244 indexed -> indexing 2016-02-03 15:36:12 +00:00
Qi Xiao
b775b97b66 parse: reader -> parser 2016-02-02 18:39:44 +00:00
Qi Xiao
b3138a842e parse: Make spaces also separators in braced list 2016-02-02 18:24:36 +00:00
Qi Xiao
e2a35509f9 parse: parse assignments; consolidate Chunk.parse 2016-01-31 19:47:52 +01:00
Qi Xiao
506be658f2 parse: cleaner handling of Redir.Dest 2016-01-31 17:03:28 +01:00
Qi Xiao
3823161fab parse: fix broken parent of Redir.Dest; add test 2016-01-31 17:01:42 +01:00
Qi Xiao
c78fc6aa5b parse: addSep now infers begin itself 2016-01-31 16:51:32 +01:00
Qi Xiao
82e027e435 Exitus -> Error 2016-01-30 17:11:43 +01:00
Qi Xiao
651c5b76e7 parse: add package doc 2016-01-29 03:00:11 +01:00
Qi Xiao
00999a6de3 support backquotes for output capture 2016-01-29 01:56:34 +01:00
Qi Xiao
a92c371467 parse: the first char of variable name can now be anything 2016-01-27 21:22:47 +00: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
5c64fa16e0 parse: support comments 2016-01-25 21:57:31 +01:00
Qi Xiao
aedf2120f8 parse: Always return whatever has been parsed 2016-01-24 19:19:44 +01:00
Qi Xiao
4b2fbce4bc parse: Don't expose Node.N() 2016-01-24 19:04:15 +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
Cheer Xiao
4c53900be9 Remove unused struct 2015-07-06 20:02:41 +02:00
Cheer Xiao
7d632d2714 Remove ItemTypeCount 2015-02-27 02:36:53 +01:00
Cheer Xiao
c1ffe6d885 Use stringer to generate ItemType.String implementation 2015-02-27 02:35:39 +01:00
Cheer Xiao
900d814edb Move util/deepprint{"" _test}.go into print package
This fully eliminates the util package.
2015-02-26 17:10:37 +01:00
Cheer Xiao
060e9eeb62 Minor refactor on parse.RedirBase 2015-02-24 22:07:01 +01:00
Cheer Xiao
7de48274b1 Strip all parse.Node structs of the Node suffix 2015-02-24 21:59:14 +01:00
Cheer Xiao
2bce0c1fcb golint fixes for parse 2015-02-24 21:52:13 +01:00
Cheer Xiao
fd2e26700a Move error-related utilities from util to errutil 2015-02-09 12:28:36 +01:00
Cheer Xiao
b9dfd552b2 util.{Panic Recover} -> util.{Throw Catch} 2015-02-09 12:11:47 +01:00
Cheer Xiao
18380eedc7 Fix StartsBare to reject # and sigils 2015-01-23 00:40:05 +01:00
Cheer Xiao
b9cf419891 Degrade or reformat XXX's 2015-01-23 00:38:44 +01:00
Cheer Xiao
f76cc8854b Exclude = from sigils. 2015-01-22 20:24:16 +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
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
1ad8fcaa1f **.go: xiaq/elvish -> elves/elvish 2014-10-29 20:50:10 +01:00