1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00
Commit Graph

8740 Commits

Author SHA1 Message Date
Rob Rix
e75c99772c Stub in a module for generic lifted pretty-printing. 2017-08-23 11:41:14 -04:00
Rob Rix
e44f43e689 🔥 Data.Functor.Classes.Pretty.Orphans. 2017-08-22 14:27:56 -04:00
Rob Rix
9a5f78a6c0 Define Pretty1 for literals without orphans. 2017-08-22 14:26:59 -04:00
Rob Rix
143bbe1908 Define Pretty1 for markup without orphans. 2017-08-22 14:20:56 -04:00
Rob Rix
507b2e02ef Define Pretty1 for comments without orphans. 2017-08-22 14:20:47 -04:00
Rob Rix
367c6a73c5 Define Pretty instances in Data.Syntax without orphans. 2017-08-22 14:20:32 -04:00
Rob Rix
7b10c9976b Derive a Pretty1 instance for Syntax. 2017-08-22 13:56:32 -04:00
Rob Rix
15adce1ec3 DerivePretty1 instances for the à la carte syntax types. 2017-08-22 13:55:49 -04:00
Rob Rix
f9974f7ec1 Define an orphan Pretty instance for SrcLoc. 2017-08-22 13:55:12 -04:00
Rob Rix
cf1619b58f Define a Pretty instance for ByteString. 2017-08-22 13:45:09 -04:00
Rob Rix
3d4c52d22e Disable warnings on orphan instances. 2017-08-22 13:40:23 -04:00
Rob Rix
c2e6438bf5 Stub in a module for orphan instances of Pretty, Pretty1, etc. 2017-08-22 13:40:00 -04:00
Rob Rix
3f979ad58e Simplify the Pretty1 instance for Patch. 2017-08-22 13:30:42 -04:00
Rob Rix
768acdd1c8 Simplify the Pretty instance for Records. 2017-08-22 13:17:49 -04:00
Rob Rix
14335fd221 Define an orphan Pretty1 instance for Union. 2017-08-22 13:12:00 -04:00
Rob Rix
41e0ea41a4 Define a Pretty instance for Category. 2017-08-22 13:06:39 -04:00
Rob Rix
35cb3da717 Define Pretty instances for Pos & Span. 2017-08-22 13:05:52 -04:00
Rob Rix
01b197ccc8 Define a Pretty instance for Range. 2017-08-22 13:03:51 -04:00
Rob Rix
b5a833e631 Define Pretty instances for Records. 2017-08-22 13:03:07 -04:00
Rob Rix
d133d3a9e9 Define a Pretty instance for Patch. 2017-08-22 12:59:24 -04:00
Rob Rix
246b220349 Define a Pretty1 instance for Patch. 2017-08-22 12:59:00 -04:00
Rob Rix
75ae8f880f Define a Pretty instance for Free. 2017-08-22 12:53:41 -04:00
Rob Rix
68cc44f91b Define a Pretty1 instance for Free. 2017-08-22 12:53:19 -04:00
Rob Rix
2b278c1688 Define a Pretty instance for Term. 2017-08-22 12:52:09 -04:00
Rob Rix
fc62716003 Define a Pretty1 instance for Term. 2017-08-22 12:51:25 -04:00
Rob Rix
3125759abe Assign comments in decorators. 2017-08-21 15:51:54 -04:00
Rob Rix
f924b8b63c Don’t bother capturing the call stack. 2017-08-21 15:35:03 -04:00
Rob Rix
5f19a7415b Move assignmentCallSite up. 2017-08-21 15:34:37 -04:00
Rob Rix
6b7114ebc8 Construct better errors at the end of branches. 2017-08-21 15:33:42 -04:00
Rob Rix
c572e8d3bf Correct the AST type parameters. 2017-08-21 15:17:34 -04:00
Rob Rix
19d1fff2eb Merge branch 'master' into assignment-optimization 2017-08-21 12:43:03 -04:00
Timothy Clem
77409b0045 Move rational and complex in Data.Syntax.Literal 2017-08-21 08:44:33 -07:00
Rob Rix
e8abd3b705 🔥 a commented-out definition of Tracing. 2017-08-18 14:44:48 -04:00
Rob Rix
bac99d7105 Avoid throwing exceptions if callstack assumptions are invalidated. 2017-08-18 14:43:15 -04:00
Rob Rix
e986ee3dce Ensure we can match single comments at the end of branches. 2017-08-18 10:40:50 -04:00
Rob Rix
0ad9ab5f44 Merge at-end rules into uncommitted choices. 2017-08-18 09:37:15 -04:00
Rob Rix
2ef277c4a3 Freeze the call stack we make errors with. 2017-08-18 09:31:17 -04:00
Rob Rix
81f72193e0 Ensure productivity for catch rules at end. 2017-08-18 09:29:14 -04:00
Rob Rix
30b6309cd1 Ensure productivity for label rules at end. 2017-08-18 09:24:26 -04:00
Rob Rix
bc4cee8b5f Avoid infinite looping on alternations of repetitions. 2017-08-18 09:06:31 -04:00
Rob Rix
cb75a9bd41 Merge the atEnd cases. 2017-08-17 16:58:34 -04:00
Rob Rix
960e7f06d6 Explain myself. 2017-08-17 16:55:50 -04:00
Rob Rix
671894e657 Push and pop call sites from the stack. 2017-08-17 16:47:34 -04:00
Rob Rix
6c903e5038 Make errors with the passed-in stack. 2017-08-17 16:46:41 -04:00
Rob Rix
566e37ed5a What have I done 😨 2017-08-17 16:41:14 -04:00
Rob Rix
06007f319b Merge literal into expression. 2017-08-17 16:28:53 -04:00
Rob Rix
964157b256 Add fallbacks to committed choice. 2017-08-17 15:36:50 -04:00
Rob Rix
be10a2918f Tracing holds a single call site. 2017-08-17 15:09:23 -04:00
Rob Rix
8ee37dd1ea Rename the stateCallStack field to stateCallSites. 2017-08-17 11:56:16 -04:00
Rob Rix
d24a299d75 Add a call stack to the State. 2017-08-17 11:55:45 -04:00
Rob Rix
2e251ee244 Factor callstacks out into a helper functor. 2017-08-17 11:50:52 -04:00
Rob Rix
1a20c7e356 Revert "Choose holds regular assignments."
This reverts commit ab81e11ec69214fd5e6c3f368bfcbf4b6073d8cd.
2017-08-17 11:15:46 -04:00
Rob Rix
e3bb646ab6 Revert "Alt holds regular assignments."
This reverts commit 865f2429dcb6cf16151a0ade4b989bb276c10596.
2017-08-17 11:15:44 -04:00
Rob Rix
21439ba2f0 Revert "Assignment is completely self-contained."
This reverts commit 44fed1d491b8098518af1eaeb6846e342d4861d8.
2017-08-17 11:15:42 -04:00
Rob Rix
c092b347a0 Revert "Rename Return to Pure."
This reverts commit d259b76d176903f199b11d3f2ada1e493a88df1d.
2017-08-17 11:15:41 -04:00
Rob Rix
b028875180 Revert "Define a Map action."
This reverts commit 8c2b57c1174de5576e976c4e97b42c6bb37daf29.
2017-08-17 11:15:40 -04:00
Rob Rix
0bd826198c Revert "Maps compose."
This reverts commit 1d97d6bff36c3d8f89e98b8fa685735f7e91c7f2.
2017-08-17 11:15:38 -04:00
Rob Rix
a162f5bbb6 Revert "Promote maps in sequence."
This reverts commit c4bffb328d5dc60677377f6f9813a3e7f444b3b4.
2017-08-17 11:15:37 -04:00
Rob Rix
a062a40f66 Revert "Bind through maps."
This reverts commit d39c0404e1e398308ad7d272134e19b7e02a4815.
2017-08-17 11:15:36 -04:00
Rob Rix
25a82e076b Revert "Add a Seq constructor."
This reverts commit 26c5e09ed43a87a1de8f002cb6af6b4bd15a5b88.
2017-08-17 11:15:34 -04:00
Rob Rix
ffcb1dac2e Revert "Run assignments direct-recursively."
This reverts commit 2ad1fe1a614b766c2ce295b55e79759bf5396db9.
2017-08-17 11:15:33 -04:00
Timothy Clem
c7fd754af8 Line em up 2017-08-16 14:45:18 -07:00
Timothy Clem
bb86b5241d Use token for pair with no children 2017-08-16 14:45:06 -07:00
Timothy Clem
d9da2c1339 Docs 2017-08-16 14:34:44 -07:00
Timothy Clem
ada7f4d4db Not using this import 2017-08-16 14:33:50 -07:00
Timothy Clem
41b843ed70 Formatting 2017-08-16 14:28:00 -07:00
Timothy Clem
680ad37eea Fix up chained strings, allow comments 2017-08-16 14:14:33 -07:00
Timothy Clem
4fa472f8a1 Comments in hashes, simplify a few literals 2017-08-16 14:11:09 -07:00
Rob Rix
802476eb8a Run assignments direct-recursively. 2017-08-16 17:04:29 -04:00
Timothy Clem
55e87d3095 Allow comments in assignments 2017-08-16 13:44:30 -07:00
Timothy Clem
f0e96bc947 Add in comment handling, re-write binary
Also add complex and rational literals
2017-08-16 13:30:13 -07:00
Rob Rix
b4aec090fe Add a Seq constructor. 2017-08-16 16:21:26 -04:00
Rob Rix
3f21c88cb1 Bind through maps. 2017-08-16 16:12:29 -04:00
Rob Rix
9aa021b404 Promote maps in sequence. 2017-08-16 16:12:06 -04:00
Rob Rix
6735125dc4 Maps compose. 2017-08-16 16:10:57 -04:00
Rob Rix
435121211a Define a Map action. 2017-08-16 16:10:12 -04:00
Rob Rix
88d8a80a03 Rename Return to Pure. 2017-08-16 16:07:08 -04:00
Rob Rix
5551390619 Assignment is completely self-contained. 2017-08-16 16:04:45 -04:00
Rob Rix
187441e9af Alt holds regular assignments. 2017-08-16 15:47:13 -04:00
Rob Rix
320a302f58 Choose holds regular assignments. 2017-08-16 15:44:17 -04:00
Timothy Clem
8fc65cbee2 Properly assign binary - and * 2017-08-16 12:25:34 -07:00
Rob Rix
7074a18012 Merge branch 'master' into assignment-optimization 2017-08-16 14:40:36 -04:00
Rob Rix
cae20bcbf9 📝 the Python combinators. 2017-08-16 14:35:57 -04:00
Rob Rix
9d63ca22ae 📝 the contextualizing operators. 2017-08-16 14:33:10 -04:00
Rob Rix
b6401aaa9f 📝 handleError & parseError. 2017-08-16 14:27:53 -04:00
Rob Rix
2457402a48 📝 emptyTerm. 2017-08-16 14:22:25 -04:00
Rob Rix
fb60c60c9c 📝 makeTerm & friends. 2017-08-16 14:22:19 -04:00
Rob Rix
f7abab4186 Convince everything that we have MonadFree instances. 2017-08-16 14:17:50 -04:00
Rob Rix
e4ccee6d02 📝 manyThrough. 2017-08-16 14:09:50 -04:00
Rob Rix
f71eab9ced 📝 advance & token. 2017-08-16 14:08:10 -04:00
Rob Rix
8bb23f0642 🔥 infixChoice. 2017-08-16 14:07:59 -04:00
Rob Rix
66abd4e327 Merge branch 'master' into systematic-comment-assignment 2017-08-16 13:23:40 -04:00
Rob Rix
40a5c5594b Rename assignBy to assign. 2017-08-16 13:21:57 -04:00
Rob Rix
fd44cc8603 Throw always has a valid error. 2017-08-16 13:11:57 -04:00
Rob Rix
05c1db40fd Alt holds a normal list. 2017-08-16 13:10:43 -04:00
Rob Rix
99bdeb6ce5 Compute the first set for label rules. 2017-08-16 13:08:33 -04:00
Rob Rix
ee42a0ece8 Push alternation through currentNode. 2017-08-16 13:02:17 -04:00
Rob Rix
7a996f739c Push alternation through advance & eof. 2017-08-16 13:01:33 -04:00
Rob Rix
b2072d24ca 🔥 the state effects. 2017-08-16 13:01:00 -04:00
Rob Rix
85bd4671b8 Fix node handling. 2017-08-16 12:56:30 -04:00