Commit Graph

18 Commits

Author SHA1 Message Date
Paul Hinze e88aeede9b core: allow distinguishing between empty lists and strings
Had to handle a lot of implicit leaning on a few properties of the old
representation:

 * Old representation allowed plain strings to be treated as lists
   without problem (i.e. shoved into strings.Split), now strings need to
   be checked whether they are a list before they are treated as one
   (i.e. shoved into StringList(s).Slice()).
 * Tested behavior of 0 and 1 length lists in formatlist() was a side
   effect of the representation. Needs to be special cased now to
   maintain the behavior.
 * Found a pretty old context test failure that was wrong in several
   different ways. It's covered by TestContext2Apply_multiVar so I
   removed it.
2015-06-25 18:53:35 -05:00
Paul Hinze 7238b3b4af core: encapsulate representation of StringList
Now the only code that cares about how StringLists are represented lives
inside string_list.go

...which gives us the ability to change it! :)
2015-06-25 17:55:57 -05:00
Paul Hinze 10b3abf405 config: introduce StringList to abstract over list hack
This is the initial pure "all tests passing without a diff" stage. The
plan is to change the internal representation of StringList to include a
suffix delimiter, which will allow us to recognize empty and
single-element lists.
2015-06-25 17:55:56 -05:00
Mitchell Hashimoto 740c25d4ea config: convert to config/lang 2015-01-13 10:27:57 -08:00
Luke Amdor e970eea3cd adding literal colon to interpolated regex 2014-12-21 14:13:41 -06:00
Mitchell Hashimoto 61b46c8612 config: add join() function 2014-10-09 21:22:35 -07:00
Mitchell Hashimoto a931707a6a config: removeCurrent finds the proper map 2014-10-09 17:23:10 -07:00
Mitchell Hashimoto 5c7ce2d003 config: make the tests more robust 2014-10-09 16:13:43 -07:00
Mitchell Hashimoto 22908d67ba config: first pass at replacing lists within a slice 2014-10-09 15:55:22 -07:00
Mitchell Hashimoto eac01c2ac8 config: replace interpolations in block keys [GH-234] 2014-08-27 13:29:02 -07:00
Mitchell Hashimoto 4a3dff2441 config: allow '/' in string args 2014-08-21 11:33:52 -07:00
Mitchell Hashimoto 742e33c672 config: accept file("test.txt") [GH-145] 2014-08-05 10:28:20 -07:00
Mitchell Hashimoto b19a976696 config: additional tests for sanity 2014-08-05 10:11:56 -07:00
Mitchell Hashimoto 4f57437144 config: parser fixes and application 2014-07-22 15:59:53 -07:00
Mitchell Hashimoto 7578fb8bdc config: interpolationWalker detects functions 2014-07-22 06:43:04 -07:00
Mitchell Hashimoto cabc007ec4 config: get rid of the variable*Walkers, replace with more generic 2014-07-21 11:45:56 -07:00
Mitchell Hashimoto e8fe26488a config: interpolationWalk seems to work 2014-07-21 11:30:43 -07:00
Mitchell Hashimoto 4c9e0f395c config: basic interpolationWalker 2014-07-21 11:24:44 -07:00