Skip to content

Commit

Permalink
deploy: ed456fd
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronostasys committed Jul 26, 2024
1 parent d8614b8 commit d96f6b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
8 changes: 3 additions & 5 deletions compiler/parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,15 @@ <h2 id="parser结构"><a class="header" href="#parser结构">parser结构</a></h
/// and returns the node representation of the file as a [ProgramNodeWrapper].
/// the `parse` doesn't attempt to read the other files besides the provided file.
#[salsa::tracked]
pub fn parse(db: &amp;dyn Db, source: SourceProgram) -&gt; Result&lt;ProgramNodeWrapper, String&gt; {
pub fn parse(db: &amp;dyn Db, source: SourceProgram) -&gt; Result&lt;ProgramNodeWrapper&lt;'_&gt;, String&gt; {
let text = source.text(db);
let re = program(Span::new_extra(text, Default::default()));
match re {
Err(e) =&gt; Err(format!(&quot;{:?}&quot;, e)),
Ok((i, node)) =&gt; {
log::info!(&quot;parse {:?}&quot;, source.path(db));
Diagnostics::push(
db,
(source.path(db).to_string(), i.extra.errors.borrow().clone()),
);
Diagnostics((source.path(db).to_string(), i.extra.errors.borrow().clone()))
.accumulate(db);
Ok(ProgramNodeWrapper::new(db, node))
}
}
Expand Down
8 changes: 3 additions & 5 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -1132,17 +1132,15 @@ <h2 id="parser结构"><a class="header" href="#parser结构">parser结构</a></h
/// and returns the node representation of the file as a [ProgramNodeWrapper].
/// the `parse` doesn't attempt to read the other files besides the provided file.
#[salsa::tracked]
pub fn parse(db: &amp;dyn Db, source: SourceProgram) -&gt; Result&lt;ProgramNodeWrapper, String&gt; {
pub fn parse(db: &amp;dyn Db, source: SourceProgram) -&gt; Result&lt;ProgramNodeWrapper&lt;'_&gt;, String&gt; {
let text = source.text(db);
let re = program(Span::new_extra(text, Default::default()));
match re {
Err(e) =&gt; Err(format!(&quot;{:?}&quot;, e)),
Ok((i, node)) =&gt; {
log::info!(&quot;parse {:?}&quot;, source.path(db));
Diagnostics::push(
db,
(source.path(db).to_string(), i.extra.errors.borrow().clone()),
);
Diagnostics((source.path(db).to_string(), i.extra.errors.borrow().clone()))
.accumulate(db);
Ok(ProgramNodeWrapper::new(db, node))
}
}
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

0 comments on commit d96f6b3

Please sign in to comment.