Aleksey Kladov
756e878158
add items from macros to modules
2019-01-01 22:15:35 +03:00
Aleksey Kladov
7dc45745a3
save top-level macros in module items
2019-01-01 22:15:35 +03:00
DJMcNab
0ddeb3b824
Fix the same bug as #396 but for bytes too
2019-01-01 12:10:21 +00:00
DJMcNab
0fd87cbc47
Use an else if
2019-01-01 11:10:08 +00:00
DJMcNab
72ab6f7727
Fix the panic
found whilst fuzzing
2018-12-31 23:02:04 +00:00
bors[bot]
c0d1b17a4e
Merge #366
...
366: parse minus before number literal pattern r=matklad a=csmoe
r?@matklad
![unknown](https://user-images.githubusercontent.com/35686186/50547871-d5449e00-0c7d-11e9-9ff5-1031e78019de.png )
Co-authored-by: csmoe <csmoe@msn.com>
2018-12-30 16:40:16 +00:00
csmoe
53c94e3ad8
parse minus before number literal
2018-12-30 23:25:07 +08:00
DJMcNab
054f22f231
Fix a fuzzing bug and add Cargo.lock to the fuzzing directory
2018-12-29 12:40:08 +00:00
Aleksey Kladov
406505e096
super simplistic macro expansion
2018-12-28 16:59:58 +03:00
Aleksey Kladov
072028e679
add macro-call node
2018-12-28 13:27:30 +03:00
Aleksey Kladov
49b0fe20ab
fix suffix ranges
2018-12-27 15:10:30 +03:00
Aleksey Kladov
a912b261d3
dump validation errors
2018-12-27 15:07:51 +03:00
Aleksey Kladov
359e70d1b2
support literal suffixes
2018-12-27 15:03:18 +03:00
Aleksey Kladov
73ded3c63c
dedupe literal parsers
2018-12-27 14:42:46 +03:00
Florian Diebold
cdca397061
Add a hir::TypeRef as an intermediate between ast::TypeRef and ty::Ty
2018-12-25 21:14:13 +01:00
Florian Diebold
2870effd5c
Implement reference / pointer types
...
- parse them
- infer types of & and * expressions
2018-12-25 20:36:06 +01:00
Florian Diebold
ab0b63992b
Implement basic completion for fields
2018-12-25 15:27:15 +01:00
Florian Diebold
0d724ea572
Improve parsing of incomplete field accesses in preparation for field completion
...
We need to be able to get the receiver even if there is no field name yet, and
currently "a." wouldn't get parsed as a field name at all. This seems to help.
2018-12-25 15:16:42 +01:00
Florian Diebold
55c941cd9f
Type field accesses
2018-12-25 15:16:42 +01:00
Florian Diebold
4cb7b0f2af
Add AST definitions for struct/variant fields etc.
...
Fixes #117
2018-12-25 15:16:42 +01:00
Florian Diebold
6fcd38cc81
Infer result of struct literals, and recurse into their child expressions
2018-12-25 15:16:42 +01:00
Florian Diebold
ef67581104
Resolve paths to defs (functions currently) during type inference
2018-12-23 17:13:11 +01:00
Florian Diebold
93ffbf80c6
Make let statements kind of work
2018-12-23 14:01:50 +01:00
Florian Diebold
3899898d75
Parse integer / float types
2018-12-23 13:48:04 +01:00
Florian Diebold
3ac605e687
Add beginnings of type infrastructure
2018-12-23 13:48:04 +01:00
bors[bot]
e4d0930d9c
Merge #316
...
316: Fix handling of nested self in paths r=matklad a=DJMcNab
See https://github.com/rust-analyzer/rust-analyzer/issues/231#issuecomment-442449505 .
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-21 23:19:14 +00:00
DJMcNab
4dbf71d332
Remove uneeded todo in lexer
2018-12-21 22:41:09 +00:00
DJMcNab
d8d60215da
Fix handling of nested self in paths
2018-12-21 22:29:59 +00:00
DJMcNab
bd5a358910
Fix where clauses using fully qualified path syntax
2018-12-21 17:20:38 +00:00
Aleksey Kladov
a5987bd715
show debug repr of literals
2018-12-21 18:49:52 +03:00
DJMcNab
55ebe449c9
Fix parsing of contextual_keyword union
2018-12-20 19:46:03 +00:00
DJMcNab
1d1950336f
Use a better way of skipping SEMIs
2018-12-20 19:07:11 +00:00
DJMcNab
dc1c64f5b9
Support a blank expression before a semicolon
2018-12-20 19:07:11 +00:00
DJMcNab
134fe4f566
Fix the tests and fix the precommit hook
2018-12-20 16:45:54 +00:00
DJMcNab
466885aa5b
Fix missing DOTDOTEQs
2018-12-20 16:22:13 +00:00
DJMcNab
f35151afed
Don't require a command before EQ in a where clause
2018-12-20 15:50:42 +00:00
DJMcNab
27e814e182
Simplify NO_BLOCK testing
2018-12-20 12:28:59 +00:00
DJMcNab
5205c016e9
Fix ambiguity with if break
...
Brought up by #290
2018-12-20 11:35:02 +00:00
DJMcNab
a3b842fb8b
Add tests and only traverse in the crates directory
2018-12-19 21:19:32 +00:00
DJMcNab
db67741430
Move is_block to lower in the call tree
2018-12-19 20:55:24 +00:00
DJMcNab
def0a95d35
Revert "Revert to f6f7c5"
...
This approach is correct, but it needs an addition to Restrictions too
This reverts commit ad00d0c8a5f64142e6636e8b048204c8f8982f4a.
2018-12-19 20:12:18 +00:00
DJMcNab
4dce66ad31
Fix handling of structs in match arms
2018-12-19 20:12:18 +00:00
DJMcNab
cd8e33fb7e
Revert to f6f7c5
2018-12-19 20:12:18 +00:00
DJMcNab
7a8560ba38
Fix expression parsing by bailing out upon a macro block being found
...
TODO: Fix this when the block like macro is in expression position
E.g. `test(test!{})` currently parses
2018-12-19 20:12:18 +00:00
DJMcNab
97e70bf50f
Possibly fix #225
2018-12-19 20:12:18 +00:00
DJMcNab
29bf389034
Actually fix at_ts doc comment (committed wrong file :P)
2018-12-19 20:12:18 +00:00
DJMcNab
012537bd6c
Fix at_ts doc comment
2018-12-19 20:12:18 +00:00
DJMcNab
20bbe0127c
Fix parsing of inclusive ranges ( #214 )
...
I'm not certain that this is correct, so extra eyes would be good
2018-12-19 20:12:18 +00:00
Roland Ruckerbauer
d0f1334226
Fixed cast expression parsing in ra_syntax.
...
The cast expression expected any type via types::type_() function,
but the language spec does only allow TypeNoBounds (types without direct extra bounds
via `+`).
**Example:**
```rust
fn test() {
6i8 as i32 + 5;
}
```
This fails, because the types::type_() function which should parse the type after the
as keyword is greedy, and takes all plus sign after path types as extra.
My proposed fix is to replace the not implemented `type_no_plus()` just calls (`type_()`)
function, which is used at several places. The replacement is `type_with_bounds_cond(p: &mut Parser, allow_bounds: bool)`, which passes the condition to relevant sub-parsers.
This function is then called by `type_()` and the new public `type_no_bounds()`.
2018-12-17 17:26:24 +01:00
Bernardo
0527e3b283
rename Edit to TextEdit and AtomEdit to AtomTextEdit
2018-12-11 19:07:17 +01:00