diff options
| author | Martin Haug <mhaug@live.de> | 2021-10-23 19:03:27 +0200 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2021-11-05 13:44:49 +0100 |
| commit | 4875633acf4701705b9b3b014eb7d94268b897c2 (patch) | |
| tree | 0aedda87c8c2dc65316e2455c35e72054d9bae0e /src/lib.rs | |
| parent | ea6ee3f667e922ed2f21b08719a45d2395787932 (diff) | |
Change parser
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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) } |
