Rob Rix
04ce0c89c6
Match BooleanOperators.
2017-08-11 09:46:08 -04:00
Rob Rix
2e0c870a82
Handle some operators in defaultTermAssignment.
2017-08-11 09:40:18 -04:00
Rob Rix
a8e32d6739
Factor pure into toTerm.
2017-08-11 09:29:01 -04:00
Rob Rix
96230f04b6
Flatten switch_body nodes out.
2017-08-11 09:25:19 -04:00
Rob Rix
b08ea229d6
Drop parenthesized expression nodes.
2017-08-11 09:20:12 -04:00
Rob Rix
f9600f91d2
Construct complete Terms in defaultTermAssignment.
2017-08-11 09:18:08 -04:00
Rob Rix
d61967e238
Don’t export defaultTermAssignment.
2017-08-11 09:14:58 -04:00
Rob Rix
61052b3340
Correct some references again.
2017-08-11 08:52:25 -04:00
Rob Rix
0c773722f9
Correct the TreeSitter imports &c.
2017-08-11 08:43:53 -04:00
Rob Rix
f8ab5f2ae3
Update the imports.
2017-08-11 08:02:30 -04:00
Rob Rix
7da8799e08
🔥 Prologue & protolude.
2017-07-28 14:37:02 -04:00
Rob Rix
ce8f7d4903
Pack node names explicitly.
2017-07-28 13:57:58 -04:00
Rob Rix
e5eb9f7a5b
🔥 the C constructor in Language.
2017-07-27 17:14:23 -04:00
Rob Rix
aa8ebfcd73
Remove the leaf type parameter from SyntaxTerm.
2017-07-23 15:56:08 -04:00
Rob Rix
0ba3264f32
Remove the leaf type parameter from Syntax.
2017-07-23 15:46:29 -04:00
Rob Rix
edcb55a686
Move the source adjacent to where it’s used.
2017-07-23 15:08:53 -04:00
Rob Rix
7902bf683d
Pass blobs to parseToAST.
2017-07-23 15:06:21 -04:00
Rob Rix
ca68b834e1
Specify language lookup with a list.
2017-07-23 15:03:02 -04:00
Rob Rix
ec0c5420a3
Use the SyntaxTerm type synonym.
2017-07-23 15:00:46 -04:00
Rob Rix
cb90f2dd43
Don’t slice the Source down repeatedly.
...
Slicing Source is O(1).
2017-07-23 14:59:34 -04:00
Rob Rix
999d2d1efb
Remove the Language from TreeSitterParsers.
2017-07-23 14:56:44 -04:00
Rob Rix
607e538588
Define a function selecting a Language for a Ptr TSLanguage.
2017-07-23 14:56:18 -04:00
Rob Rix
b66cfcc52c
Select the lesser of the node symbol & the parse error symbol.
...
This effectively clamps the ERROR symbol (65535) to the maximal constructor.
2017-07-14 14:43:36 -04:00
Rob Rix
e050a44cf4
Define a Node type for the intermediate representation of metadata.
2017-07-12 15:55:21 -04:00
Rob Rix
c4fc6e5c4a
Use the AST synonym.
2017-07-12 15:40:54 -04:00
Rob Rix
230570c42b
Obviate the need for Maybe
around symbols.
2017-07-12 12:55:57 -04:00
Rob Rix
1be293ec79
Avoid copying the underlying ByteString.
2017-06-24 10:55:07 -04:00
Rob Rix
ca49dec207
Avoid another trip through Text.
2017-06-24 10:54:03 -04:00
Rob Rix
fc09d74b73
Rename the Source module to Data.Source.
2017-06-24 09:59:41 -04:00
Rob Rix
1edc6a2718
Rename the Range module to Data.Range.
2017-06-24 09:46:28 -04:00
Rob Rix
6e7122e09a
Rename the SourceSpan module to Data.Span.
2017-06-24 09:41:51 -04:00
Rob Rix
4097d4bfc0
Rename SourceSpan to Span and SourcePos to Pos.
2017-06-24 09:30:34 -04:00
Timothy Clem
8f6d25b9d8
Properly slice source for root node
...
Fixes a nasty bug where source files that begin with a newline weren't
getting properly sliced at the root node (code was erroneously assuming
that the first node starts at byte 0). If a file starts with a newline
the program node ends up starting at byte 1 and everything afterward was
offset by one.
2017-06-14 10:29:11 -06:00
Rob Rix
549d85a84d
🔥 the AST type synonym.
2017-06-07 15:19:32 -04:00
Rob Rix
156fa1723c
🔥 Node.
2017-06-07 14:51:08 -04:00
Rob Rix
a5c74c4270
Define Rose as a type synonym for Cofree [].
2017-06-07 11:45:06 -04:00
Rob Rix
8679b82859
Bracket the cleanup of the document in treeSitterParser.
...
🎩 @rewinfrey for the reminder.
2017-05-19 17:28:36 -04:00
Rob Rix
35d8248547
🔥 a redundant import.
2017-05-19 13:40:04 -04:00
Rob Rix
2224df586d
Parameterize parseToAST with the tree-sitter language.
2017-05-19 13:06:00 -04:00
Rob Rix
9e5282e73d
Manage the document’s lifetime with bracket.
2017-05-19 13:02:37 -04:00
Rob Rix
82ec363828
Generalize ALaCarteRubyParser to a parser holding an assignment.
2017-05-19 13:01:28 -04:00
Rob Rix
041f22ddca
Pass the Source to parsers.
2017-05-19 11:52:44 -04:00
Rob Rix
7a24e8fe01
Pass the Source to documentToTerm.
2017-05-19 11:50:08 -04:00
Rob Rix
25f7db5bbc
Produce a single root term.
2017-05-19 10:00:15 -04:00
Rob Rix
7c3309d571
🔥 the import of Parser from the TreeSitter module.
2017-05-19 09:42:58 -04:00
Rob Rix
d3e63cfac7
Node symbols are in Maybe to accommodate errors.
2017-05-17 15:07:27 -04:00
Rob Rix
17f63a6b8a
🔥 a redundant constraint.
2017-05-17 14:58:20 -04:00
Rob Rix
2ef8c5c9fb
Define a function to safely construct values of enumerations.
2017-05-17 14:58:09 -04:00
Rob Rix
75e8fb9543
🔥 parseRubyToAST.
2017-05-17 14:29:18 -04:00
Rob Rix
8f35aa4d14
Extract & generalize toAST.
2017-05-17 14:27:38 -04:00