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

241 Commits

Author SHA1 Message Date
Rob Rix
23c4a8b6c3 Tidy up how we get child terms. 2017-03-27 16:03:35 -04:00
Rob Rix
32b6ff17e0 Filter non-empty children in getChildren. 2017-03-27 16:02:25 -04:00
Rob Rix
72b5b056de Don’t pass the range in. 2017-03-27 15:59:48 -04:00
Rob Rix
e6b85848da We no longer need to evaluate these strictly. 2017-03-27 15:57:11 -04:00
Rob Rix
fa68774cbd Take a Node, not a Ptr Node. 2017-03-27 15:54:34 -04:00
Rob Rix
19ce10451a Batch-copy nodes. 2017-03-27 15:48:24 -04:00
Rob Rix
598b933aea Byte ranges, not character ranges. 2017-02-15 16:17:01 -05:00
Rob Rix
566891afb7 Offset by the parent’s starting index. 2017-02-13 13:51:07 -05:00
Rob Rix
7cf8a7ddbb Compute the child node’s range, not the parent’s. 2017-02-13 12:28:05 -05:00
Rob Rix
d18dfe453e Use the correct offset for child ranges.
This also ensures that getChild must close over the correct range & source.
2017-02-13 11:41:57 -05:00
Rob Rix
b473e4eafe Extract isNonEmpty & nodeRange. 2017-02-13 11:41:10 -05:00
Rob Rix
2bfc2d91c8 Offset the child range correctly. 2017-02-10 16:57:33 -05:00
Rob Rix
f8cc3b8933 Close over the right source. 2017-02-10 16:53:40 -05:00
Rob Rix
00c14e403a Revert "Source carries its Range."
This reverts commit 6e075787935c10b0bd7256673a5623cb5d1a4945.
2017-02-10 16:44:09 -05:00
Rob Rix
f3bad55fee Revert "Close over the correct source."
This reverts commit 6770d9970d9e4aee6029e9b739583c1dc8cfc372.
2017-02-10 16:44:07 -05:00
Rob Rix
46aa3b8fc0 Revert "Take the range from the source."
This reverts commit fd59885f1dc0a4dba976617ed6791d76ad44f708.
2017-02-10 16:44:06 -05:00
Rob Rix
aa78d3215f Revert "Make doubly sure we don’t close over the wrong variable."
This reverts commit 9d24a050f33ad4e123f82a272331d39fd75de68b.
2017-02-10 16:44:03 -05:00
Rob Rix
d1a5167999 Make doubly sure we don’t close over the wrong variable. 2017-02-10 15:45:02 -05:00
Rob Rix
94c448bef3 Take the range from the source. 2017-02-10 15:42:16 -05:00
Rob Rix
26efa43611 Close over the correct source. 2017-02-10 15:35:10 -05:00
Rob Rix
672ff179ed Source carries its Range. 2017-02-10 15:33:41 -05:00
Rob Rix
f723b576e1 Pass the getter in. 2017-02-10 12:59:22 -05:00
Rob Rix
ad5d659941 Cut down on crossing the FFI. 2017-02-10 12:58:15 -05:00
Rob Rix
5688c2b447 Pre-slice the source passed to toTerm. 2017-02-10 12:26:02 -05:00
Rob Rix
9bcabf21b7 Extract a function to retrieve the range for a node. 2017-02-10 12:24:10 -05:00
Rob Rix
bc2a29d84e Source is no longer parametric in the character type. 2017-02-10 11:21:24 -05:00
Rob Rix
e85eb49e0e Tidy up the imports a bit. 2017-02-10 11:02:38 -05:00
Rob Rix
060680f070 🔥 a redundant import. 2017-02-10 09:32:10 -05:00
Rob Rix
42871bcc94 Fix do notation. 2017-02-10 09:28:57 -05:00
Rob Rix
2108d7287a Use the new input string with length API. 2017-02-10 09:23:51 -05:00
Timothy Clem
d6796afd6f Pass Text to tree-sitter 2017-02-09 21:31:29 -08:00
Rob Rix
2929fb3cb4 Rename Syntax.Error to ParseError. 2017-01-25 03:09:53 -05:00
Rob Rix
296c53f187 Rename Category.Error to ParseError. 2017-01-25 03:08:06 -05:00
Rob Rix
833f2f755e Add a language-agnostic assignment of Throw. 2017-01-25 03:02:03 -05:00
Rob Rix
6207e474b6 Add a language-agnostic Yield assignment. 2017-01-25 02:58:04 -05:00
Rob Rix
9a4c92d735 Only pass the category to term assignment. 2017-01-23 16:04:31 -05:00
Rob Rix
a27edde9e4 Return Syntax from Go term assignment. 2017-01-23 16:01:42 -05:00
Rob Rix
281df3178f Handle Case language agnostically. 2017-01-23 15:12:38 -05:00
Rob Rix
e95ae2c5d9 Ruby uses Switch/Case like anyone else would. 2017-01-23 15:06:05 -05:00
Rob Rix
974020891a Assign Switch terms language-agnostically. 2017-01-23 15:04:05 -05:00
Rob Rix
a7cbea7051 Handle break/continue statements language-agnostically. 2017-01-23 14:09:07 -05:00
Rob Rix
a0bdcb9f60 Handle pairs in the default term assignment. 2017-01-23 14:07:47 -05:00
Rob Rix
3809b07723 Group language-agnostic patterns. 2017-01-20 16:49:45 -05:00
Rob Rix
ed217d9d10 Add language-agnostic handling of while statements. 2017-01-20 16:40:34 -05:00
Rob Rix
a49ca3cbe6 Add language-agnostic handling of return statements. 2017-01-20 16:39:27 -05:00
Rob Rix
24753de48d Add a default handler for if statements. 2017-01-20 15:20:36 -05:00
Rob Rix
c9af7b1196 Per-language term assignment is pure. 2017-01-20 15:03:40 -05:00
Rob Rix
6abb7d812a Handle operators in the default term assignment. 2017-01-20 14:59:49 -05:00
Rob Rix
a16f3b4e99 defaultTermAssignment receives the list of all children. 2017-01-20 14:55:43 -05:00
Rob Rix
3ed32e9225 defaultTermAssignment returns in IO. 2017-01-20 14:54:03 -05:00