diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-10-26 20:39:40 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-10-26 20:39:40 +0300 |
commit | e525acb60f91eb8778863a19b70aecf1d23d606a (patch) | |
tree | 03d0a113d6387ad319320c65f9a6007245bd4c28 /src/steps.rs | |
parent | f8133d4c23cd1941fda6a790ef27883c55722fac (diff) | |
download | subplot-e525acb60f91eb8778863a19b70aecf1d23d606a.tar.gz |
Add: docstrings
Diffstat (limited to 'src/steps.rs')
-rw-r--r-- | src/steps.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/steps.rs b/src/steps.rs index dbdabe6..ca9a75c 100644 --- a/src/steps.rs +++ b/src/steps.rs @@ -1,4 +1,11 @@ /// A parsed scenario step. +/// +/// The scenario parser creates these kinds of data structures to +/// represent the parsed scenario step. The step consits of a kind +/// (expressed as a StepKind), and the text of the step. +/// +/// This is just the step as it appears in the scenario in the input +/// text. It has not been matched with a binding. See Match for that. #[derive(Debug, Eq, PartialEq)] pub struct ScenarioStep { kind: StepKind, @@ -22,7 +29,11 @@ impl ScenarioStep { } } -/// The kind of step we have. +/// The kind of scenario step we have: given, when, or then. +/// +/// This needs to be extended if the Subplot language gets extended with other +/// kinds of steps. However, note that the scenario parser will hide aliases, +/// such as "and" to mean the same kind as the previous step. #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum StepKind { Given, |