Benno Fünfstück
2b186aed67
Remove unused symbol parser
...
'symbol' had a different type for parsec/trifecta and
wasn't used anywhere.
2014-08-03 16:16:04 +02:00
Benno Fünfstück
bc71229ab0
parser nixList: consume whitespace between items
2014-08-03 15:57:16 +02:00
Benno Fünfstück
3922112bab
add a few hunit tests for parser
2014-08-03 15:56:01 +02:00
Daniel Bergey
4242b91e8a
add some language pragmas
2014-08-02 22:28:15 +00:00
Daniel Bergey
71a0876120
simplify set and lambda parsing
...
use try and parser failure
2014-08-02 22:28:14 +00:00
Daniel Bergey
149ae51d60
make function application left-associative
2014-08-02 18:36:26 +00:00
Daniel Bergey
05596093c4
Add semicolons to inherit pretty-printer
2014-08-02 16:00:41 +00:00
John Wiegley
748bebf965
Improvements to default.nix file
2014-08-02 11:08:46 -04:00
John Wiegley
5cd581ce0d
Merge pull request #9 from jwiegley/inherit
...
implement inherit in name bindings
2014-08-02 10:57:58 -04:00
Daniel Bergey
8e795d2f4e
implement inherit in name bindings
...
Two points which are not clear from the manual, where this patch follows
the grammar.y bison implementation:
- The presence of parens in the first argument distinguishes the scoped
inherit
- inherit has the same syntax in sets as in let
2014-07-22 03:14:26 +00:00
John Wiegley
755f39d3c6
Merge pull request #8 from bergey/bool
...
accept false in nixBool
2014-07-20 02:13:51 -05:00
Daniel Bergey
8111b111cd
accept false in nixBool
2014-07-19 22:49:28 +00:00
John Wiegley
a2a9dc32bf
Merge pull request #6 from bergey/attr-list
...
Accept NAttr attribute paths in lists
2014-07-19 15:43:49 -05:00
Daniel Bergey
7b9ad451f8
Accept NAttr attribute paths in lists
...
This is a common pattern, e.g., maintainers or fonts.fonts
2014-07-19 16:49:38 +00:00
John Wiegley
92cf6eecf9
Switch from pretty to ansi-wl-pprint
2014-07-18 04:42:06 -05:00
Luca Bruno
74e85e44f8
Evaluate non-recursive let expression
2014-07-08 14:46:56 +02:00
Luca Bruno
5ecd9e1a1a
Evaluate assert
2014-07-08 14:34:56 +02:00
Luca Bruno
b254b0347c
Evaluate with expression
2014-07-08 13:47:31 +02:00
Luca Bruno
cf34b6edee
Evaluate if condition
2014-07-08 13:38:48 +02:00
Luca Bruno
2e8e2be67a
Evaluate NArgSet to NVArgSet
2014-07-08 11:27:31 +02:00
Luca Bruno
ea6cdf330d
pretty: wrap app argument around parens
2014-07-07 18:23:16 +02:00
Luca Bruno
5849e17529
pretty: Fix displaying double quotes for strings
2014-07-07 17:39:49 +02:00
Luca Bruno
610fc3c780
Use pretty util functions for filling paragraphs
2014-07-07 17:29:55 +02:00
Luca Bruno
a12c576bcc
Pretty print operators
2014-07-07 17:25:28 +02:00
Luca Bruno
8103ed8cc8
Fix compilation. Better indentation for the pretty printer
2014-07-07 16:55:03 +02:00
John Wiegley
be5c81d190
Merge pull request #5 from lethalman/pretty
...
Pretty print nix expressions
2014-07-07 09:31:28 -05:00
John Wiegley
806e497ce8
Merge pull request #4 from lethalman/fixdot
...
Fix dot operator associativity. a.b.c would not be parsed otherwise
2014-07-07 09:31:20 -05:00
John Wiegley
2ee2f71832
Merge pull request #3 from lethalman/master
...
Use a type to express rec sets instead of a bool
2014-07-07 09:31:07 -05:00
Luca Bruno
b12dc4f187
Pretty print nix expressions
2014-07-07 16:26:14 +02:00
Luca Bruno
1e8ee3af67
Fix dot operator associativity. a.b.c would not be parsed otherwise
2014-07-07 15:01:03 +02:00
Luca Bruno
8ea220ea4f
Use a type to express rec sets instead of a bool
2014-07-07 11:29:25 +02:00
John Wiegley
bad6a0a6d5
Add the NInherit type
2014-07-04 16:26:13 -05:00
John Wiegley
5b8ef9997d
if/then/else is working, next to do is "inherit"
2014-07-04 16:24:47 -05:00
John Wiegley
bb378af269
Several more minor fixes
2014-07-04 16:23:21 -05:00
John Wiegley
0f0f865e4f
Add a reserved words as "stop words" for nixApp
2014-07-04 16:15:58 -05:00
John Wiegley
072b2e8d51
Add support for more operators
2014-07-04 16:07:32 -05:00
John Wiegley
2468bf6826
Normalize recent changes to fit the overall design
2014-07-04 15:56:53 -05:00
John Wiegley
74e1812f74
Merge pull request #1 from lethalman/master
...
Fix parsing of rec sets with reserved keyword
2014-07-04 15:43:30 -05:00
John Wiegley
d5d77cd84f
Merge pull request #2 from lethalman/ifthenelse
...
Parse if then else
2014-07-04 15:43:03 -05:00
Luca Bruno
051e8fffc2
Parse if then else
2014-07-04 14:39:41 +02:00
Luca Bruno
f8d0496bba
Fix parsing of rec sets with reserved keyword
2014-07-04 13:43:22 +02:00
John Wiegley
f5ab0e5be4
Building with Trifecta works again, but there are issues
2014-07-04 04:08:38 -05:00
John Wiegley
bb3648cf73
Let is working, next is "if" syntax
2014-07-04 02:15:20 -05:00
John Wiegley
3c7025f9f3
Preliminary support for "let" syntax
2014-07-04 02:06:56 -05:00
John Wiegley
03d8ccc5bb
Add operator reserved names for the lexer
2014-07-04 02:06:43 -05:00
John Wiegley
2a931e52e1
Add a stub in the evaluator for operators
2014-07-04 02:06:27 -05:00
John Wiegley
d9dfbcbd5a
Add the C++ parser as documentation
2014-07-04 01:55:27 -05:00
John Wiegley
b01890048c
Remove a comment which is already out of date
2014-07-04 01:55:04 -05:00
John Wiegley
710b421b46
Remove some dead code in Types.hs
2014-07-04 01:54:44 -05:00
John Wiegley
569ebf3f9a
Clean up parser, implement operators
...
We now parse down to line 45 in all-packages.nix: let.
2014-07-04 01:52:50 -05:00