aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-18 12:57:26 +0000
committerGitHub <[email protected]>2020-02-18 12:57:26 +0000
commitc447fe9bc06006a7080da782cf67d739c91b534c (patch)
tree45cbc9578b24437da3eedc6a234784be22b1f38c /crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt
parent742459c8fe08e359ae380e3e1dc0d059c0b4f871 (diff)
parent053ccf4121797e4e559e3225d46d3f23cb1ad70b (diff)
Merge #3026
3026: ra_syntax: reshape SyntaxError for the sake of removing redundancy r=matklad a=Veetaha Followup of #2911, also puts some crosses to the todo list of #223. **AHTUNG!** A big part of the diff of this PR are test data files changes. Simplified `SyntaxError` that was `SyntaxError { kind: { /* big enum */ }, location: Location }` to `SyntaxError(String, TextRange)`. I am not sure whether the tuple struct here is best fit, I am inclined to add names to the fields, because I already provide getters `SyntaxError::message()`, `SyntaxError::range()`. I also removed `Location` altogether ... This is currently WIP, because the following is not done: - [ ] ~~Add tests to `test_data` dir for unescape errors *// I don't know where to put these errors in particular, because they are out of the scope of the lexer and parser. However, I have an idea in mind that we move all validators we have right now to parsing stage, but this is up to discussion...*~~ **[UPD]** I came to a conclusion that tree validation logic, which unescape errors are a part of, should be rethought of, we currently have no tests and no place to put tests for tree validations. So I'd like to extract potential redesign (maybe move of tree validation to ra_parser) and adding tests for this into a separate task. Co-authored-by: Veetaha <[email protected]> Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt')
-rw-r--r--crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt
index d12f4c99b..b9e60f6c1 100644
--- a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt
+++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt
@@ -125,8 +125,8 @@ SOURCE_FILE@[0; 183)
125 WHITESPACE@[180; 181) "\n" 125 WHITESPACE@[180; 181) "\n"
126 R_CURLY@[181; 182) "}" 126 R_CURLY@[181; 182) "}"
127 WHITESPACE@[182; 183) "\n" 127 WHITESPACE@[182; 183) "\n"
128error 34: expected pattern 128error [34; 34): expected pattern
129error 34: expected COLON 129error [34; 34): expected COLON
130error 34: expected type 130error [34; 34): expected type
131error 180: expected function arguments 131error [180; 180): expected function arguments
132error 180: expected a block 132error [180; 180): expected a block