summaryrefslogtreecommitdiff
path: root/src/ast.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-06-08 07:59:03 +0300
committerLars Wirzenius <liw@liw.fi>2020-06-08 08:06:11 +0300
commit163ec445c2474698ba073333c11140be6bb4fddc (patch)
treebe240f8bdcd829e9ac1b22049d3f645455f0a636 /src/ast.rs
parentc337d1d59526fb8dfe569d49bfd355c64bbf07eb (diff)
downloadsubplot-163ec445c2474698ba073333c11140be6bb4fddc.tar.gz
refactor: export DataFile so programs can use embedded files
This will be used soon by a program to extract data files from subplots, but I expect it to be more generally useful in the future.
Diffstat (limited to 'src/ast.rs')
-rw-r--r--src/ast.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ast.rs b/src/ast.rs
index bc3547d..a10707a 100644
--- a/src/ast.rs
+++ b/src/ast.rs
@@ -980,10 +980,12 @@ impl DataFile {
DataFile { filename, contents }
}
+ /// Return name of embedded file.
pub fn filename(&self) -> &str {
&self.filename
}
+ /// Return contents of embedded file.
pub fn contents(&self) -> &str {
&self.contents
}