1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00
Commit Graph

299 Commits

Author SHA1 Message Date
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
Rob Rix
c2cc74a33c Extract anaM to the top level. 2017-05-17 14:26:46 -04:00
Rob Rix
68a422b25a 🔥 Language.JavaScript. 2017-05-17 12:48:43 -04:00
Rob Rix
aed82c030d Merge branch 'master' into opt-in-anonymous-nodes 2017-05-04 11:02:30 -04:00
Timothy Clem
c9f69c32b5 ++haskell-tree-sitter to use halt_on_error 2017-05-03 13:22:46 -07:00
Rob Rix
14c12b3582 📝s. 2017-05-02 15:21:29 -04:00
Rob Rix
8a506e5efa Define a convenience for parsing straight to a term, logging errors. 2017-05-02 14:55:05 -04:00
Rob Rix
496c009379 Don’t pass the source through. 2017-05-02 14:53:07 -04:00
Rob Rix
0e2559db0f Reintroduce Node/AST type synonyms. 2017-04-21 10:08:19 -04:00
Rob Rix
8cc3da0de3 Assignment receives source spans. 2017-04-21 09:55:19 -04:00
Rob Rix
ab059af248 Assignment receives ranges. 2017-04-21 09:54:17 -04:00
Rob Rix
2f696ef88d Pass the symbol in a record. 2017-04-21 09:52:23 -04:00
Rob Rix
b5575d7298 📝 parseRubyToAST. 2017-04-21 09:44:05 -04:00
Rob Rix
a29b7b6f2b Return the Source alongside the AST.
This makes for easier chaining.
2017-04-21 09:43:29 -04:00
Rob Rix
9a42d8f4c8 Replace Node with its symbol, dropping the source. 2017-04-20 15:53:01 -04:00
Rob Rix
c46e0904d1 Slice in linear time. 2017-04-12 16:18:26 -04:00
Rob Rix
da022960f4 toAST unfolds the whole tree. 2017-04-12 16:02:12 -04:00
Rob Rix
12eca8a3b0 Structure Ruby AST importing as an unfold(ish). 2017-04-12 15:03:35 -04:00
Rob Rix
e50ec88a01 Export parseRubyToAST. 2017-04-12 14:32:32 -04:00
Rob Rix
ce075494cf Stub in a function to produce AST for Ruby. 2017-04-12 14:31:55 -04:00
Rob Rix
5b755aa355 Use the DefaultFields synonym everywhere. 2017-03-31 15:22:26 -04:00
joshvera
461b1c665b Merge remote-tracking branch 'origin/master' into typescript 2017-03-29 10:17:53 -04:00
joshvera
f86d43a6e5 Add namespace mapping 2017-03-28 15:43:21 -04:00
Rob Rix
a8410e8829 🔥 various uses of LambdaCase. 2017-03-28 15:32:45 -04:00