aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-10-07 09:33:00 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-10-07 09:33:00 +0100
commitf53c8aee065fac2816b50964d4b7544c84d67837 (patch)
treec67a4f6d58435115042c4d19484fac4fbc9efedb /crates
parentaa309291921921b5d6451d907655dfbb496d76ae (diff)
parentfce76cc79a409629eca5536cf407bf95af1eee8b (diff)
Merge #96
96: [WIP] Begin to add some contributing docs (#95) r=matklad a=DJMcNab Currently adds some documentation about `cargo gen-kinds`. Note that I am unsure of some of the details, such as why `DOT` is in `multi_byte_tokens`, hence the [WIP] tag. Based on #95. Co-authored-by: Daniel McNab <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs3
-rw-r--r--crates/ra_syntax/src/ast/generated.rs.tera5
-rw-r--r--crates/ra_syntax/src/grammar.ron5
-rw-r--r--crates/ra_syntax/src/syntax_kinds/generated.rs3
-rw-r--r--crates/ra_syntax/src/syntax_kinds/generated.rs.tera5
5 files changed, 20 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index c945c094a..2db6dff1b 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -1,3 +1,6 @@
1// This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-kinds` is run
2// Do not edit manually
3
1use { 4use {
2 ast, 5 ast,
3 SyntaxNodeRef, AstNode, 6 SyntaxNodeRef, AstNode,
diff --git a/crates/ra_syntax/src/ast/generated.rs.tera b/crates/ra_syntax/src/ast/generated.rs.tera
index a72e9b732..ceb2cd7e2 100644
--- a/crates/ra_syntax/src/ast/generated.rs.tera
+++ b/crates/ra_syntax/src/ast/generated.rs.tera
@@ -1,3 +1,8 @@
1{# THIS File is not automatically generated:
2the below applies to the result of this template
3#}// This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-kinds` is run
4// Do not edit manually
5
1use { 6use {
2 ast, 7 ast,
3 SyntaxNodeRef, AstNode, 8 SyntaxNodeRef, AstNode,
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index 77ae4c7db..4b990fd8d 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -1,3 +1,5 @@
1// Stores definitions which must be used in multiple places
2// See `cargo gen-kinds` (defined in crates/tools/src/main.rs)
1Grammar( 3Grammar(
2 single_byte_tokens: [ 4 single_byte_tokens: [
3 [";", "SEMI"], 5 [";", "SEMI"],
@@ -23,8 +25,9 @@ Grammar(
23 ["^", "CARET"], 25 ["^", "CARET"],
24 ["%", "PERCENT"], 26 ["%", "PERCENT"],
25 ], 27 ],
28 // TODO: Confirm surmision: the tokens which cannot be recorded in a single UTF-8 byte
26 multi_byte_tokens: [ 29 multi_byte_tokens: [
27 [".", "DOT"], 30 [".", "DOT"], // Note: DOT is here because <TODO: REASON>
28 ["..", "DOTDOT"], 31 ["..", "DOTDOT"],
29 ["...", "DOTDOTDOT"], 32 ["...", "DOTDOTDOT"],
30 ["..=", "DOTDOTEQ"], 33 ["..=", "DOTDOTEQ"],
diff --git a/crates/ra_syntax/src/syntax_kinds/generated.rs b/crates/ra_syntax/src/syntax_kinds/generated.rs
index 7882bded9..11e9150bb 100644
--- a/crates/ra_syntax/src/syntax_kinds/generated.rs
+++ b/crates/ra_syntax/src/syntax_kinds/generated.rs
@@ -1,3 +1,6 @@
1// This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-kinds` is run
2// Do not edit manually
3
1#![allow(bad_style, missing_docs, unreachable_pub)] 4#![allow(bad_style, missing_docs, unreachable_pub)]
2#![cfg_attr(rustfmt, rustfmt_skip)] 5#![cfg_attr(rustfmt, rustfmt_skip)]
3use super::SyntaxInfo; 6use super::SyntaxInfo;
diff --git a/crates/ra_syntax/src/syntax_kinds/generated.rs.tera b/crates/ra_syntax/src/syntax_kinds/generated.rs.tera
index 90618721a..018564b8a 100644
--- a/crates/ra_syntax/src/syntax_kinds/generated.rs.tera
+++ b/crates/ra_syntax/src/syntax_kinds/generated.rs.tera
@@ -1,3 +1,8 @@
1{# THIS File is not automatically generated:
2the below applies to the result of this template
3#}// This file is automatically generated based on the file `./generated.rs.tera` when `cargo gen-kinds` is run
4// Do not edit manually
5
1#![allow(bad_style, missing_docs, unreachable_pub)] 6#![allow(bad_style, missing_docs, unreachable_pub)]
2#![cfg_attr(rustfmt, rustfmt_skip)] 7#![cfg_attr(rustfmt, rustfmt_skip)]
3use super::SyntaxInfo; 8use super::SyntaxInfo;