aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add Either depEdwin Cheng2019-05-261-0/+1
| |
| * Put back unexpaned_macros after resolveEdwin Cheng2019-05-261-0/+3
| |
* | Merge #1328bors[bot]2019-05-278-126/+166
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1328: Change TokenSource to iteration based r=matklad a=edwin0cheng This PR change the `TokenSource` trait from random access to be an iteration based trait: ```rust /// `TokenSource` abstracts the source of the tokens parser operates one. /// /// Hopefully this will allow us to treat text and token trees in the same way! pub trait TokenSource { fn current(&self) -> Token; /// Lookahead n token fn lookahead_nth(&self, n: usize) -> Token; /// bump cursor to next token fn bump(&mut self); /// Is the current token a specified keyword? fn is_keyword(&self, kw: &str) -> bool; } /// `TokenCursor` abstracts the cursor of `TokenSource` operates one. #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct Token { /// What is the current token? pub kind: SyntaxKind, /// Is the current token joined to the next one (`> >` vs `>>`). pub is_jointed_to_next: bool, } ``` Note that the refactoring based on this new trait will be separated to incoming PRs Co-authored-by: Edwin Cheng <[email protected]>
| * Remove duplicated codeEdwin Cheng2019-05-251-4/+0
| |
| * Simplify token_tree_to_xxxEdwin Cheng2019-05-251-47/+20
| |
| * Change TokenSource to iteration basedEdwin Cheng2019-05-258-100/+171
| |
* | Colorize Rust code as HTMLAleksey Kladov2019-05-255-153/+138
| |
* | reformatAleksey Kladov2019-05-234-8/+8
| |
* | :arrow_up: rustcAleksey Kladov2019-05-2358-610/+640
| |
* | Merge #1317bors[bot]2019-05-231-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 1317: profile highlighting r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | profile highlightingAleksey Kladov2019-05-231-0/+3
| | |
* | | Merge #1316bors[bot]2019-05-239-335/+244
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 1316: Simplify code model r=matklad a=matklad * remove references from types which are now id-based * remove api/impl separation, as the impl is a tiny fraction of API anyway Co-authored-by: Aleksey Kladov <[email protected]>
| * | rename code_model_api -> code_modelAleksey Kladov2019-05-234-4/+4
| | |
| * | kill code_model_implAleksey Kladov2019-05-235-89/+64
| | |
| * | remove more referencesAleksey Kladov2019-05-231-56/+56
| | |
| * | remove referencesAleksey Kladov2019-05-233-157/+105
| | |
| * | kill krate_implAleksey Kladov2019-05-233-26/+12
| | |
| * | fix signatureAleksey Kladov2019-05-231-4/+4
| | |
* | | Merge #1290bors[bot]2019-05-2313-26/+102
|\| | | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | 1290: Add Union to code_model r=matklad a=matklad @flodiebold I am conflicted about two possible implementation approaches: * we can add a separate `struct Union` to code model * we can add `fn is_union(&self)` to existing `Struct` This PR goes with the former approach, because it seems like Unions are sufficiently different in semantics to warrant a separate types. Which is in contrast to Syntax Tree, where both structs and unions share the same node kind, because their syntax is the same. What would be the right thing to do here? Co-authored-by: Aleksey Kladov <[email protected]>
| * add union to code_modelAleksey Kladov2019-05-2313-26/+102
| |
* | Merge #1312bors[bot]2019-05-235-201/+259
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 1312: Introduce TokenBuffer r=matklad a=edwin0cheng As discussed in Zulip, this PR Introduce `TokenBuffer` , a safe version of `syn` crate `TokenBuffer` which support cursor based traversal of `tt::TokenTree`. This is the basis of incoming refactoring of `TokenSource` iterator based API. This PR do the following things: * Add TokenBuffer in `ra_tt` crate. * Try to use this new API to refactor the `SubtreeSource` to prove it usage. Co-authored-by: Edwin Cheng <[email protected]>
| * Use slice instead of VecEdwin Cheng2019-05-231-4/+4
| |
| * FormattingEdwin Cheng2019-05-231-1/+1
| |
| * Refactor SubtreeSourceEdwin Cheng2019-05-223-201/+88
| |
| * Introduce TokenBufferEdwin Cheng2019-05-222-0/+171
| |
* | Improve highlighting of name refsLaurențiu Nicola2019-05-232-9/+168
| |
* | Merge #1311bors[bot]2019-05-234-97/+143
|\ \ | | | | | | | | | | | | | | | | | | | | | 1311: Move NameRef classification logic out of reference_definition r=matklad a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * | Move NameRef classification logic out of reference_definitionLaurențiu Nicola2019-05-234-97/+143
| | |
* | | updated gen_lsp_server examplesDylan Moonfire2019-05-234-9/+170
|/ / | | | | | | | | - updated the documentation with an example that has no errors with current compiler - added two example code to test compilation and show in use
* | add profile calls to parsing/expansion routinesAleksey Kladov2019-05-223-1/+7
| |
* | Merge #1281bors[bot]2019-05-223-117/+263
|\ \ | |/ |/| | | | | | | | | | | 1281: Move arm cond to match guard r=matklad a=unrealhoang I did split the rename to another commit, yet Github UI still show entirely new file change. Please review using commits. Co-authored-by: Unreal Hoang <[email protected]>
| * add assist to move arm condition to match guardUnreal Hoang2019-05-213-117/+263
| |
| * renameUnreal Hoang2019-05-162-2/+2
| |
* | better profiligAleksey Kladov2019-05-212-8/+28
| |
* | Fix crash with int vars in canonicalizationFlorian Diebold2019-05-211-1/+6
| |
* | Use fuel branch for ChalkFlorian Diebold2019-05-212-4/+4
| | | | | | | | This makes sure we don't take too long in trait solving.
* | re-enable chalkAleksey Kladov2019-05-211-17/+16
| |
* | publish gen_lsp_server 0.2Aleksey Kladov2019-05-212-17/+18
| |
* | Merge #1299bors[bot]2019-05-211-1/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1299: Use ThemeColor and add support for light themes r=matklad a=lnicola Part of #1294. - switch to `ThemeColor` - add light and high contrast theme definitions - highlight control flow keywords and `unsafe` Co-authored-by: Laurențiu Nicola <[email protected]>
| * | Address feedbackLaurențiu Nicola2019-05-211-4/+11
| | |
| * | Use ThemeColor and add support for light themesLaurențiu Nicola2019-05-211-1/+11
| | |
* | | profile type inferenceAleksey Kladov2019-05-214-3/+6
| | |
* | | profile implements queryAleksey Kladov2019-05-211-0/+2
| | |
* | | fix odrer-of-iteration bug in testsAleksey Kladov2019-05-212-7/+15
| | |
* | | sort hash maps for testsAleksey Kladov2019-05-215-212/+196
| | |
* | | Merge #1296bors[bot]2019-05-212-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1296: :arrow_up: insta r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | :arrow_up: instaAleksey Kladov2019-05-212-2/+2
| |/ /
* / / add _query to query functionsAleksey Kladov2019-05-212-6/+6
|/ /
* | add is_union to structs ASTAleksey Kladov2019-05-201-1/+17
| |
* | remove minor code duplicationAleksey Kladov2019-05-202-20/+16
| |