summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2021-10-23 19:03:27 +0200
committerMartin Haug <mhaug@live.de>2021-11-05 13:44:49 +0100
commit4875633acf4701705b9b3b014eb7d94268b897c2 (patch)
tree0aedda87c8c2dc65316e2455c35e72054d9bae0e /src/lib.rs
parentea6ee3f667e922ed2f21b08719a45d2395787932 (diff)
Change parser
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 41b2e88b..468c06d8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -58,7 +58,6 @@ use crate::layout::{EvictionPolicy, LayoutCache};
use crate::loading::Loader;
use crate::source::{SourceId, SourceStore};
use crate::style::Style;
-use crate::syntax::Markup;
/// The core context which holds the loader, configuration and cached artifacts.
pub struct Context {
@@ -100,14 +99,9 @@ impl Context {
&self.style
}
- /// Parse a source file and return the resulting markup.
- pub fn parse(&mut self, id: SourceId) -> TypResult<Markup> {
- parse::parse(self.sources.get(id))
- }
-
/// Evaluate a source file and return the resulting module.
pub fn evaluate(&mut self, id: SourceId) -> TypResult<Module> {
- let ast = self.parse(id)?;
+ let ast = self.sources.get(id).ast()?;
eval::eval(self, id, &ast)
}