aboutsummaryrefslogtreecommitdiff
path: root/src/parse/ast
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/ast')
-rw-r--r--src/parse/ast/nodes.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parse/ast/nodes.rs b/src/parse/ast/nodes.rs
index 2347d5b..36b15c8 100644
--- a/src/parse/ast/nodes.rs
+++ b/src/parse/ast/nodes.rs
@@ -63,6 +63,7 @@ pub enum Literal {
Int(u32),
Float(f32),
Str(String),
+ Bool(bool),
}
impl Literal {
@@ -71,6 +72,8 @@ impl Literal {
Int(int) => Self::Int(int),
Float(float) => Self::Float(float),
Str(string) => Self::Str(string),
+ KeywordTrue => Self::Bool(true),
+ KeywordFalse => Self::Bool(false),
_ => panic!("Can't create literal from '{:?}'.", token.variant),
}
}