47 Commits

Author SHA1 Message Date
37bb75b891 Add comparison operators. 2018-03-29 09:51:08 -05:00
01e7ee59b7 Unify Errors so better error messages can be had. 2018-03-23 18:34:26 -05:00
bfde2c5238 Add Boolean types. 2018-03-23 17:31:30 -05:00
eeac1ba599 Parsing the map operations. 2018-03-21 19:01:38 -05:00
51edc6d15c Retain the position of errors in the tokenization phase. 2018-03-21 19:00:07 -05:00
8a6935c3da FEATURE: NULL or empty values in the type system.
* Flags with empty values are considered not having a value they are set to.
* Json outputs empty values as null.
* Env ignores variable with empty values.
2018-03-12 20:37:23 -05:00
bafe5b3c30 cargo fmt pass with the new rustfmt-preview 2018-02-15 19:55:43 -06:00
30c9bc64b2 The great documentation roundup.
Add docstrings for all kinds of types.
2018-02-07 20:22:08 -06:00
a2f689ce0d Cleanup and formatting.
* Unused code warnings.
* Ran cargo fmt.
2018-02-05 19:43:04 -06:00
97c97ced55 Finish splitting the Tokenization and parsing stages.
* Added some helper matcher macros for tokens.
* Added some helper assertion macros for tests.
* Tokenization and Parsing are two separate stages.
2018-02-02 15:29:24 -06:00
b25e12608c FIX: Some unittests had incorrect assertions. 2017-12-24 15:37:56 -05:00
4d11d26e13 FIX: Couldn't parse list indexes in a selector. 2017-12-24 15:24:43 -05:00
336dd5e5ea FEATURE: Parsing of comments. 2017-12-24 15:24:06 -05:00
4c2528fe07 FEATURE: Allow expressions at the beginning of a Selector. 2017-12-21 19:44:55 -06:00
7a0a194fb9 Feature: Better error reporting.
* Common Error Type with line and column reporting.
* Removed some todos.
2017-12-09 10:02:45 -06:00
64e4fb6a28 Cleanup: Extraneous types, compact code, and fmt.
* Got rid of LocatedNode since it was the same thing as Positioned.
* Positioned has a constructor now.
* Cleaned up some unnecessary macros.
* Created some more macros to make code more compact.
* Ran cargo fmt
* Some fixes to the README.
2017-12-03 17:24:13 -06:00
091cde9ffb Feature: add list concatenation. 2017-11-30 22:39:41 -06:00
fffdad589c Refactor: Finish converting all the enum types to tuple around struct pattern. 2017-11-29 19:07:36 -06:00
389f395383 Cleanup: formatting and todos
cargo fmt
changed a fixme to a todo
2017-11-29 18:42:33 -06:00
afdd2e5be8 List Parsing and evaluation support.
Also some formatting and todo cleanup.
2017-11-26 12:22:58 -05:00
e975dea201 cleanup: fix some selector vs symbol parsing issues
Add test coverage of selector parsing.
2017-11-15 22:41:55 -06:00
b8c7d660e5 No more Optional Position information. 2017-11-08 20:06:38 -06:00
0be96dc851 cargo fmt 2017-11-08 18:55:10 -06:00
4f3cc3dbf6 Thread position information through to more places. 2017-11-08 18:44:56 -06:00
1e3d19755c Add location information for all tokens.
Also add optional position information for some of the AST elements.
2017-11-05 15:26:52 -06:00
45d0fb6e59 Add tokenizer mode that uses nom to parse the individual tokens.
This allows us to start to break down the problem into tokens and their
position in the parsed syntax.
2017-10-02 21:32:06 -05:00
c091878364 Add a macro for constructing values with or without a position. 2017-09-23 11:33:50 -05:00
c91ff1c218 Update nom to version 3.2+ and add nom_locate as a dependency. 2017-09-21 17:50:09 -05:00
14bbd19f16 Renamed BinaryExpression to BinaryOpDef for consistency. 2017-09-21 08:12:18 -05:00
53d598b773 Refactor Add position fields to our Expression Definition Structs 2017-09-21 08:10:09 -05:00
f95ecddea2 Refactored Binary Expressions to a common type and cleaned it up 2017-09-21 07:50:34 -05:00
a8b6e7f851 Refactor the Format Expression to use a FormatDef struct. 2017-09-21 07:50:11 -05:00
42fe368dae Refactor the Copy expression to use a CopyDef struct. 2017-09-21 07:49:43 -05:00
b3677861c6 Add datastructure to support tracking position of Value nodes in the AST. 2017-09-21 07:49:17 -05:00
6c3662d361 Revert "WIP: Track the positions of our tokens and AST elements."
This reverts commit b4ec44323b25f7532964a543ac52e905349dc314.
2017-09-18 18:32:47 -05:00
b4ec44323b WIP: Track the positions of our tokens and AST elements. 2017-09-12 20:08:58 -05:00
45b9712380 Some Refactoring and cleanups.
* Moved the AST datastructures into their own module.
* Collapsed the Expression Enum to just wrappers around structs
  instead of having actual structs in the definitions.
* Added a few more unit tests to ensure nothing got broken.
* Added documentation for the new structs.
* Added a unifying BinaryExpression Tuple type.
2017-09-06 18:16:28 -05:00
9b367fa2d2 Allow '-' and '_' in symbols. 2017-08-11 23:16:13 -05:00
9df7d57f69 Add format string support. 2017-08-09 21:21:36 -05:00
c00306337b Cleanup warnings. 2017-07-29 13:02:47 -05:00
c1c05cad7c Implement Macros and Select.
Note: We change all our lifetimes in this.

It was getting too complicated for this first pass to avoid
copies. This makes lifetime management much easier to handle.

Each one of Val, Value, and Expression contain no references anymore.
2017-07-25 20:23:49 -05:00
1ee7409367 Lambdas are probably better named as macros. 2017-07-12 20:55:03 -05:00
4f18686fb8 Add README and License information. 2017-07-11 20:36:05 -05:00
8a5c121f26 Basic Evaluation Logic for the Builder. 2017-07-11 20:36:05 -05:00
72d03e21dd Add the build module.
Builder struct that takes a list of Statements and constructs a
Tuple from it.
2017-07-11 20:36:05 -05:00
59cf18fe4d Let and Import names and paths should just be strings. 2017-07-11 20:36:05 -05:00
4a156adae2 Refactor into separate modules for parsing and interpreting. 2017-07-11 20:36:05 -05:00