aboutsummaryrefslogtreecommitdiff
path: root/src/tree/file_builder.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-01-28 07:51:49 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-01-28 07:51:49 +0000
commitefadcf715862a2d96af0f57d2b53bfa325390779 (patch)
tree6e930103a8b9e74041bf0e6e9f7c7e696d481afd /src/tree/file_builder.rs
parent6d3caf58ca042cf6b5707822e51619adf511acd0 (diff)
parent50b9012e10d2fa74294547c25642b4a69fed4bda (diff)
Merge #15
15: Add minimal docs to most public symbols r=matklad a=CAD97 Also sticks a safety on some warnings that rustc provides. If you're just stubbing out a module and don't want rustc refusing to compile it because you haven't documented it yet, stick `#![allow(missing_docs)]` at the top.
Diffstat (limited to 'src/tree/file_builder.rs')
-rw-r--r--src/tree/file_builder.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tree/file_builder.rs b/src/tree/file_builder.rs
index 939922cb2..738705f02 100644
--- a/src/tree/file_builder.rs
+++ b/src/tree/file_builder.rs
@@ -1,3 +1,6 @@
1// FIXME(CAD97): I don't understand this mod well enough to stub out docs for the public symbols yet
2#![allow(missing_docs)]
3
1use {SyntaxKind, TextRange, TextUnit}; 4use {SyntaxKind, TextRange, TextUnit};
2use super::{File, NodeData, NodeIdx, SyntaxErrorData}; 5use super::{File, NodeData, NodeIdx, SyntaxErrorData};
3 6
@@ -8,6 +11,7 @@ pub trait Sink {
8 fn error(&mut self) -> ErrorBuilder; 11 fn error(&mut self) -> ErrorBuilder;
9} 12}
10 13
14#[derive(Debug)]
11pub struct FileBuilder { 15pub struct FileBuilder {
12 text: String, 16 text: String,
13 nodes: Vec<NodeData>, 17 nodes: Vec<NodeData>,
@@ -139,6 +143,7 @@ fn grow(left: &mut TextRange, right: TextRange) {
139 *left = TextRange::from_to(left.start(), right.end()) 143 *left = TextRange::from_to(left.start(), right.end())
140} 144}
141 145
146#[derive(Debug)]
142pub struct ErrorBuilder<'f> { 147pub struct ErrorBuilder<'f> {
143 message: Option<String>, 148 message: Option<String>,
144 builder: &'f mut FileBuilder, 149 builder: &'f mut FileBuilder,