1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
Commit Graph

4391 Commits

Author SHA1 Message Date
Timothy Clem
a98185f1a6 Rescue blocks in all their glory 2016-11-02 17:18:09 -07:00
Timothy Clem
87bdc57c9b Order matters? 2016-11-02 13:53:42 -07:00
Timothy Clem
fbe7bc7c13 Better handling of case/when 2016-11-02 13:42:06 -07:00
Timothy Clem
295d03dd43 Handle rescue blocks 2016-11-02 13:05:30 -07:00
Timothy Clem
71f53b37fd Handle ensure blocks and refactor to BlockExpression syntax 2016-11-02 12:55:48 -07:00
Timothy Clem
6eebd35a8f Improved elsif parsing and summaries 2016-11-02 12:32:46 -07:00
Timothy Clem
185f1de69c Better handling of else blocks 2016-11-02 11:16:57 -07:00
Timothy Clem
2c1497ab99 Handle else blocks in begin statements 2016-11-02 11:10:01 -07:00
Timothy Clem
fc73be16d7 Better handling of begin statements 2016-11-02 10:52:40 -07:00
Rick Winfrey
1cd998ff88 Merge branch 'master' into syntax-term-to-json 2016-11-01 17:58:15 -05:00
Rick Winfrey
f1b92d9a9e Revert JSONSyntaxTerm back to ToJSON instance 2016-11-01 16:39:33 -05:00
Rick Winfrey
41cf3f32ee Remove general ToJSON instance for SyntaxTerm in Term.hs 2016-11-01 16:38:57 -05:00
Rick Winfrey
73dd1ec8a8 Create Term.Instances module
- This allows us to differentiate between ToJSON instances for
SyntaxTerm
2016-11-01 16:38:28 -05:00
Rick Winfrey
b20e4c195f Add ToJSON (Record fields) type class constraints 2016-11-01 15:04:43 -05:00
Rick Winfrey
61bdea425d Add generic ToJSON Cost instance 2016-11-01 15:04:16 -05:00
Rick Winfrey
72899821bc Add generic ToJSON instance for Syntax 2016-11-01 15:03:18 -05:00
Rick Winfrey
0b0dcdc274 Add general SyntaxTerm ToJSON instance 2016-11-01 15:03:02 -05:00
Rick Winfrey
9168795a1d Add newtype JSONSyntaxTerm ToJSON instance 2016-11-01 15:02:26 -05:00
Rick Winfrey
c4feca3e5b Add Record general ToJSON instances 2016-11-01 15:01:43 -05:00
Timothy Clem
6cac25d2a9 Merge remote-tracking branch 'origin/master' into ruby 2016-11-01 08:50:54 -07:00
Timothy Clem
f78704b9c0 Merge remote-tracking branch 'origin/master' into ruby 2016-11-01 08:27:24 -07:00
Josh Vera
d4d99d359e Merge branch 'master' into json-api 2016-11-01 11:20:29 -04:00
Rick Winfrey
582e7ce978 Remove NamespaceImport Category (unrelated change) 2016-11-01 10:09:05 -05:00
Timothy Clem
ada47c7208 Error if for statements don't match expected shape 2016-10-31 13:47:51 -07:00
Timothy Clem
4f3e5fa069 Produce error nodes if productions don't match expected shape 2016-10-31 13:29:58 -07:00
Timothy Clem
271831b70d Exhaustively match to error 2016-10-31 13:15:19 -07:00
Timothy Clem
a950a07b40 While and Until just have a list of f 2016-10-31 13:14:32 -07:00
Timothy Clem
ad422ffc11 Produce errors if we can't match while, until, for, or functions 2016-10-31 12:14:52 -07:00
Timothy Clem
9ac247dbd4 Element reference parsing, control statement tests 2016-10-31 10:15:44 -07:00
Rick Winfrey
aa724c4159 Preserve original type class constraint order 2016-10-28 07:56:26 -05:00
Timothy Clem
ba305a2a44 Parse module declarations 2016-10-27 12:47:27 -07:00
Timothy Clem
c21307b5f7 Parse for iterator syntax 2016-10-27 10:07:24 -07:00
Timothy Clem
539a68f06e Parse lambdas 2016-10-27 09:24:28 -07:00
Timothy Clem
f09c834e01 Parse array and percent array syntax 2016-10-27 08:30:34 -07:00
Timothy Clem
2a9e26f144 Support regex literals 2016-10-26 15:44:53 -07:00
Timothy Clem
644d101394 Support or, and operators 2016-10-26 15:22:59 -07:00
Rick Winfrey
3a073a2849 Add NamespaceImport category to Split Renderer 2016-10-26 17:13:29 -05:00
Rick Winfrey
93f5464ad2 Add NamespaceImport category to DiffSummary 2016-10-26 17:13:14 -05:00
Timothy Clem
5dd53c0b93 if/unless modifiers and (sort of) unless statements 2016-10-26 14:49:51 -07:00
Timothy Clem
3bbfb765a5 Parse if, with some caveats 2016-10-26 14:32:08 -07:00
Timothy Clem
013f6392ff Parse while and until statements and modifiers 2016-10-26 12:54:21 -07:00
Timothy Clem
986a3572d4 Merge remote-tracking branch 'origin/master' into ruby 2016-10-26 10:30:29 -07:00
Timothy Clem
1b6c70f4ee Parse yield and return 2016-10-26 10:27:38 -07:00
Timothy Clem
eb52ca6f90 Handle method arguments, updated tree-sitter-ruby 2016-10-26 10:14:39 -07:00
Timothy Clem
1bc5ba394a Classes, member invocation, case statements 2016-10-25 11:36:30 -07:00
Timothy Clem
649119c967 Method invocation 2016-10-24 12:23:10 -07:00
Rick Winfrey
d23a2ccd8b Add NamespaceImport category to end of list, so as not to affect the hash values 2016-10-24 13:43:22 -05:00
Timothy Clem
3d13f570be Add ConditionalAssignment to JSON output 2016-10-24 10:56:08 -07:00
Timothy Clem
56c2dae42f Bring in LOTS more of the ruby grammar 2016-10-24 10:43:31 -07:00
Rick Winfrey
000774bed5 Use NamespaceImport category in JavaScript 2016-10-24 12:26:07 -05:00
Rick Winfrey
2e4c93245e Add NamespaceImport Category 2016-10-24 12:25:41 -05:00
Rick Winfrey
a6480e3e51 Make consistent terms and language
In many cases, we don’t need to identify the syntax / category for a
term in the names of the fields.

We were using mixed abbreviations and full words. I’ve opted to always
use full words.
2016-10-24 12:25:20 -05:00
Rick Winfrey
f546eb3d60 Move patchFields 2016-10-24 12:24:15 -05:00
Rick Winfrey
52535ece24 Let the instances breathe 2016-10-24 12:24:03 -05:00
Rick Winfrey
9d9020c409 Extract syntaxToTermField function 2016-10-24 11:06:41 -05:00
Rick Winfrey
ddd0536cc3 Moves 2016-10-24 10:30:08 -05:00
Rick Winfrey
881d68dc2c Add Operator 2016-10-24 10:27:03 -05:00
Rick Winfrey
4ee94d12b5 Move MemberAccess 2016-10-24 10:26:54 -05:00
Rick Winfrey
fef0a4b24f Add MathAssignment 2016-10-24 10:25:49 -05:00
Rick Winfrey
6be772fe7b Move to replicate order in Syntax 2016-10-24 10:25:40 -05:00
Timothy Clem
ce0f690af3 Add interpolation to split output 2016-10-21 15:14:16 -07:00
Timothy Clem
22c617e9e9 Ruby interpolation parsing 2016-10-21 13:55:00 -07:00
Timothy Clem
f5621a7ed0 Test parsing ruby numbers, strings, and symbols 2016-10-21 12:59:35 -07:00
Rick Winfrey
bd9fb81037 Consolidate back to single functions, passing in a function to extract the correct Annotation 2016-10-20 17:19:42 -05:00
Rick Winfrey
85a3864a96 Remove unused function 2016-10-20 16:34:54 -05:00
Rick Winfrey
c91fd3270d Use new afterTerm behavior for all semantic-diff 2016-10-20 16:33:47 -05:00
Rick Winfrey
2f0d04ef0f Use afterTerm' 2016-10-20 16:22:56 -05:00
Rick Winfrey
e68be8e3b8 Take the after annotation when we take the afterTerm 2016-10-20 16:22:45 -05:00
Rick Winfrey
8d7a74c2b2 Remove behavior stripping Indexed nodes 2016-10-20 16:22:29 -05:00
Timothy Clem
bab517ac06 Parser error nodes, comments, and program 2016-10-20 09:44:41 -07:00
Rick Winfrey
78f778c82b Remove unnecessary import 2016-10-19 18:12:00 -05:00
Rick Winfrey
fe803e94ba Only remove indexed nodes for import statements when the indexed node contains a child indexed node and so on.
This is to make sure for these cases, when we have an indexed node
containing a single indexed node and so on, that we’re capturing the
range of children Leaf or other Syntax other than Indexed nodes. This
is because of an issue that occurs when we construct SyntaxDiff for
import syntaxes specifically for nested indexed statements.
2016-10-19 18:08:16 -05:00
Rick Winfrey
84d2f7ae36 Remove comments 2016-10-19 18:06:34 -05:00
Timothy Clem
e4bb574700 Catch integer literals and abbreviate in summaries 2016-10-19 11:02:02 -07:00
Timothy Clem
456bbb41ae Handle basic assignment for ruby 2016-10-19 10:34:49 -07:00
Timothy Clem
4b42939bf3 Basics of Ruby termConstructor 2016-10-19 08:30:46 -07:00
Rick Winfrey
c64056894d Clean up warnings 2016-10-18 16:57:29 -05:00
Rick Winfrey
7ae5ad32f3 Use termNameFromChildren and revmoeIndexedNode helper function for Import SyntaxDiff terms 2016-10-18 16:51:08 -05:00
Rick Winfrey
956fd5ba25 Add removeIndexedNode helper function 2016-10-18 16:50:43 -05:00
Rick Winfrey
e423dfdc2b Add Data.List (concatMap) 2016-10-18 16:50:22 -05:00
Rick Winfrey
5de66456f9 Merge branch 'master' into improve-imports 2016-10-18 11:06:36 -05:00
Rick Winfrey
469b76d82b Remove redundant imports 2016-10-18 10:44:36 -05:00
Rick Winfrey
5149ff100f Update Summary.hs to use DefaultFields 2016-10-18 10:43:05 -05:00
Rick Winfrey
9b9569b8a5 Update Diffing.hs to use DefaultFields 2016-10-18 10:41:58 -05:00
Rick Winfrey
90f1cc2fb4 Remove unnecessary brackets 2016-10-18 10:34:36 -05:00
Rick Winfrey
bad1ae2d78 Remove warnings 2016-10-17 18:47:49 -05:00
Rick Winfrey
c05a3a961e For Import Syntax nodes containing an Indexed Syntax node with only one element, we need to take the source span of the child.
- If we don’t, this can lead to us taking more of the source than is
desired. This relates to unnamed nodes in TreeSitter. The trouble is we
don’t have the ability to determine if an unnamed node is what we want.
2016-10-17 18:44:15 -05:00
Rick Winfrey
e831229779 Don't single quote around an import statement 2016-10-17 18:42:24 -05:00
Rick Winfrey
69492f39e4 Maintain space for "from" when term node is not an Indexed node 2016-10-17 11:29:49 -05:00
Rick Winfrey
36eb60d05d Conditionally match against Indexed nodes when applying toTermName for Import Syntax 2016-10-17 11:01:45 -05:00
Rick Winfrey
a4dfe48ff4 Output an import statement's expressions 2016-10-14 13:39:57 -05:00
Rick Winfrey
6aa62cc8f9 Merge branch 'master' into constraint-alias 2016-10-14 12:01:31 -05:00
Rick Winfrey
56dfa479e8 Revert moves 2016-10-14 12:00:28 -05:00
Rick Winfrey
75a254175c Use DefaultFields constraint alias 2016-10-14 11:53:47 -05:00
Rick Winfrey
014a6a21d7 Update comment, extract appendParentContexts function 2016-10-14 11:53:34 -05:00
Rick Winfrey
8960836bcb Change order of functions, use DefaultFields constraint alias 2016-10-14 11:53:08 -05:00
Rick Winfrey
053393fdca Move data declarations to top 2016-10-14 11:52:36 -05:00
Rick Winfrey
c1f6be7b7f Add DefaultFields constraint alias 2016-10-14 11:51:17 -05:00
joshvera
3839a8605a Bump tests 2016-10-14 12:12:38 -04:00
Rick Winfrey
0262cb0879 Merge branch 'master' into improve-anonymous-funs 2016-10-13 17:56:39 -05:00